|
|
|
สอบถามปัญหาใส่ javascript lightbox ทับกับ โค้ด javascript อื่นครั้บจะแก้อย่างไรให้โค้ดทำงานทั้งหมด |
|
|
|
|
|
|
|
Code
<script src="css/prototype.js" type="text/javascript"></script>
<script src="css/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
<script src="css/lightbox.js" type="text/javascript"></script> (ตอนนี้ไม่ได้ใส่โค้ดไว้ด้านล่างน้ะครั้บ)
คือตอนนี้โค้ดจะมีเมนูส่วนหัวอ้ะคั้บ กับโค้ดที่ทำให้เลื่อนจากด้านล่างขึ้นมาด้านบนทำงานอยู่ แต่เมื่อผมใส่โค้ด lightbox นี้ลงไป โค้ดตัวอื่นก้ไม่ทำงานน้ะครั้บช่วยแก้ให้หน่อยน้ะครั้บพอดีผมทดลองใส่ๆโค้ดเพื่อการศึกษาดูอ้ะครั้บ และถ้าตัวไหนไม่มีประโยชหรือแก้เอาออกยังไม่ฝากด้วยน้ะครั้บ (แก้ไม่ถูกอ้ะครั้บหรือจะสอนให้ก็ขอบคุนมากเลยครั้บ)
Code (PHP)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=""><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--Favicon-->
<meta name="viewport" content="width=1024">
<link rel="shortcut icon" href="image/favicon.ico" type="image/x-icon">
<!--Javascript-->
<script type="text/javascript"></script>
<title>PraramSurat</title>
<meta name="Keywords" content="PraramSurat">
<meta name="Description" content="PraramSurat">
<meta name="robots" content="index,follow">
<meta name="revisit-after" content="1 day">
<!-- domain = Praramsurat -->
<link rel="stylesheet" href="css/justmakeweb.css" type="text/css">
<link rel="stylesheet" href="css/style.css" type="text/css">
<script type="text/javascript" src="css/jquery.min.js"></script>
<link type="text/css" rel="stylesheet" href="css/jquery-ui.custom.css">
<script type="text/javascript" src="css/jquery-ui.custom.min.js"></script>
<link rel="stylesheet" href="css/nyroModal.css" type="text/css" media="screen">
<script type="text/javascript" src="css/jquery.nyroModal.custom.js"></script>
<script type="text/javascript" src="css/ajaxcontent.js"></script>
<!--[if IE 6]>
<script type='text/javascript' src='/java/nyroModal/js/jquery.nyroModal-ie6.min.js'></script>
<![endif]-->
<script type="text/javascript" src="css/tipsy.js"></script>
<link rel="stylesheet" type="text/css" href="css/tipsy.css">
<script type="text/javascript" src="css/jquery.highlight.js"></script>
<script type="text/javascript" src="css/myscript.js"></script>
<script src="css/jquery.maskedinput.js" type="text/javascript"></script>
<!-- Add fancyBox main JS and CSS files -->
<script type="text/javascript" src="css/jquery.fancybox.js"></script>
<link rel="stylesheet" type="text/css" href="css/jquery.fancybox.css" media="screen">
<!-- Add Media helper (this is optional) -->
<script type="text/javascript" src="css/jquery.fancybox-media.js"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('.fancybox,.modalBox,.mpopup').fancybox({
//data-fancybox-group='gal'
prevEffect : 'fade',
nextEffect : 'fade',
openEffect : 'fade',
openSpeed : 200,
closeEffect : 'fade',
closeSpeed : 200,
closeBtn : true,
arrows : true,
nextClick : true,
padding :5
});
$('.fancybox-thumbs,.modalBoxT,.mpopupT').fancybox({
//data-fancybox-group='gal'
prevEffect : 'fade',
nextEffect : 'fade',
openEffect : 'fade',
openSpeed : 200,
closeEffect : 'fade',
closeSpeed : 200,
closeBtn : false,
arrows : true,
nextClick : true,
padding :5,
helpers : {
title : {
type : 'inside'
},
buttons : {},
thumbs : {
width : 50,
height : 50
}
}
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
// drop down menu
// 5
$('.TopMenuDown0').hover(function () { $('.TopMenu0').addClass('hover'); });
$('.TopMenuDown1').hover(function () { $('.TopMenu1').addClass('hover'); });
$('.TopMenuDown2').hover(function () { $('.TopMenu2').addClass('hover'); });
$('.TopMenuDown3').hover(function () { $('.TopMenu3').addClass('hover'); });
$('.TopMenuDown4').hover(function () { $('.TopMenu4').addClass('hover'); });
$('.TopMenuDown5').hover(function () { $('.TopMenu5').addClass('hover'); });
$('.dropdown-top,.dropdown-left,.dropdown-right').each(function () {
$(this).parent().eq(0).hover(function () {
$('.dropdown-top:eq(0),.dropdown-left:eq(0),.dropdown-right:eq(0)', this).show();
}, function () {
$('.dropdown-top:eq(0),.dropdown-left:eq(0),.dropdown-right:eq(0)', this).hide();
$(this).find('.hover').removeClass('hover');
});
});
;
});
</script>
<style type="text/css">
ul.dropdown-top{
margin: 0;
padding-top:0px !important;
padding-bottom: 5px !important;
display: none;
position: absolute !important;
width:220px;
top:100%;
left:-10px;
display: none;
background:#303030;
border-radius: 0 0 3px 3px;
z-index: 9999 !important;
}
ul.dropdown-top ul.dropdown-top{
position:absolute !important;
top: 0 !important;
left: 95% !important;
}
ul.dropdown-top li{
margin: 0 !important;
float: none;
position: relative !important;
list-style: none;
display: block;
width:100%;
}
ul.dropdown-top li a{
width:auto;
display:block !important;
position:relative !important;
height:auto !important;
background-image:none !important;
padding:6px;
color:#FFFFFF;
float:none !important;
font-weight:normal;
font-size:12px;
}
ul.dropdown-top li a:hover {
color:#000000;
background-color:;
}
</style>
<!-- load top menu-->
<link href="css/lightbox.css" rel="stylesheet" type="text/css" />
<img src="css/menu_normal.png" style="width:0px;height:0px;"><img src="css/menu_active.png" style="width:0px;height:0px;"><img src="css/menu_hover.png" style="width:00px;height:0px;">
<script type="text/javascript">
$(document).ready(function() {
$(".various").fancybox({
maxWidth : 900,
maxHeight : 800,
fitToView : false,
width : '90%',
height : '90%',
autoSize : false,
closeClick : false,
openEffect : 'none',
closeEffect : 'none'
});
});
</script>
<script type="text/javascript">
$(document).ready(function() {
// Show or hide the sticky footer button
$(window).scroll(function() {
if ($(this).scrollTop() > 200) {
$('.go-top').fadeIn(200);
} else {
$('.go-top').fadeOut(200);
}
});
// Animate the scroll to top
$('.go-top').click(function(event) {
event.preventDefault();
$('html, body').animate({scrollTop: 0}, 800);
})
});
</script>
<script type="text/javascript">
$("document").ready(function($){
var nav = $('.container-header');
$(window).scroll(function () {
if ($(this).scrollTop() > 100) {
nav.addClass("f-nav");
} else {
nav.removeClass("f-nav");
}
});
});
$("document").ready(function($){
var nav = $('.page-header');
$(window).scroll(function () {
if ($(this).scrollTop() > 100) {
nav.addClass("f-nav-header");
} else {
nav.removeClass("f-nav-header");
}
});
});
$("document").ready(function($){
var nav = $('.logo');
$(window).scroll(function () {
if ($(this).scrollTop() > 100) {
nav.addClass("f-nav-logo");
} else {
nav.removeClass("f-nav-logo");
}
});
});
$("document").ready(function($){
var nav = $('.page-menu');
$(window).scroll(function () {
if ($(this).scrollTop() > 100) {
nav.addClass("f-nav-menu");
} else {
nav.removeClass("f-nav-menu");
}
});
});
</script>
Tag : JavaScript
|
ประวัติการแก้ไข 2015-09-11 07:15:09
|
|
|
|
|
Date :
2015-09-11 07:13:53 |
By :
exe1235 |
View :
1014 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|