Lightbox
我做了一个制表导航使用jQuery
.. Chrome
可视化是好的,但在Firefox
是一团糟。灯箱+ jQuery冲突
我做错了什么,因为event.preventDefault();
和return false
不工作(我不得不使用滚动点击锚a href="#id_name
的选项卡控制器后搬回到页面的底部)
任何帮助将不胜感激。
头:
<!-- Lightbox + Prototype + jQuery -->
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script type="text/javascript">
if (typeof jQuery == 'undefined') { document.write(unescape("%3Cscript src='js/jquery-1.8.0.min.js' type='text/javascript'%3E%3C/script%3E")); }
</script>
的jQuery的标签导航:
<script type="text/javascript">
$(document).ready(function() {
//Default Action
$(".tab_content").hide(); //Hide all content
$("ul.bmenu li:first").addClass("active").show(); //Activate first tab
$(".tab_content:first").show(); //Show first tab content
//On Click Event
$("ul.bmenu li").click(function(event) {
event.preventDefault(); //non impedisce di scrollare to Top
$("html, body").animate({ scrollTop: $(document).height() }, "slow");
$("ul.bmenu li").removeClass("active"); //Remove any "active" class
$(this).addClass("active"); //Add "active" class to selected tab
$(".tab_content").hide(); //Hide all tab content
var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content
$(activeTab).fadeIn(); //Fade in the active content
return false; //non impedisce di scrollare to Top
});
});
</script>
一些HTML的:
<div class="tab_content content" id="tab2">
<div class="images_grid"> <!-- images_grid_collezione -->
<!-- Riga 1 -->
<a href="imgs_grid/Rosso_01.png" rel="lightbox[medardo_rosso]"><img class="grid_img" src="imgs_grid/Rosso_01.png" alt="" /></a>
<a href="imgs_grid/Rosso_02.png" rel="lightbox[medardo_rosso]"><img class="grid_img" src="imgs_grid/Rosso_02.png" alt="" /></a>
我上传的临时目录here的网站。
谢谢,但这样的选项卡导航打破(不知道为什么说实话) –