Team:Grenoble/script
From 2011.igem.org
(Difference between revisions)
Maxime.huet (Talk | contribs) (Created page with "<!-- Remove all empty <p> tags --> <script type="text/javascript"> $(document).ready(function() { $("p").filter( function() { return $.trim($(this).html()...") |
Maxime.huet (Talk | contribs) |
||
Line 6: | Line 6: | ||
}).remove() | }).remove() | ||
}); | }); | ||
+ | </script> | ||
+ | |||
+ | <!-- jQuery Tools (slider) --> | ||
+ | <script src="http://cdn.jquerytools.org/1.2.5/full/jquery.tools.min.js"></script> | ||
+ | <script> | ||
+ | $(function() { | ||
+ | // initialize scrollable | ||
+ | $(".scrollable").scrollable().navigator(); | ||
+ | }); | ||
+ | </script> | ||
+ | |||
+ | <!-- Navigation scroll follow --> | ||
+ | |||
+ | <script type="text/javascript"> | ||
+ | $(window).scroll(function () { | ||
+ | var scrollPos = $(window).scrollTop(); | ||
+ | if (scrollPos > 110) { | ||
+ | $(".navigation").addClass("stickToTop"); | ||
+ | } else { | ||
+ | $(".navigation").removeClass("stickToTop"); | ||
+ | } | ||
+ | if (scrollPos > 180) { | ||
+ | $(".toc").addClass("stickBelowNavigation"); | ||
+ | } else { | ||
+ | $(".toc").removeClass("stickBelowNavigation"); | ||
+ | } | ||
+ | }); | ||
+ | </script> | ||
+ | |||
+ | |||
+ | |||
+ | <!-- Sexy Drop Down (drop down navigation) --> | ||
+ | |||
+ | <script type="text/javascript"> | ||
+ | $(document).ready( | ||
+ | function(){ | ||
+ | $("ul.subnav").parent().find("> a").append("<span> ▼</span>"); | ||
+ | $("ul.topnav li").hover( | ||
+ | function() { | ||
+ | // Hover over | ||
+ | $(this).parent().find("ul.subnav").hide(); | ||
+ | $(this).find("ul.subnav").show(); | ||
+ | // Hover out | ||
+ | $(this).hover( | ||
+ | function() { | ||
+ | }, | ||
+ | function(){ | ||
+ | $(this).find("ul.subnav").hide(); | ||
+ | } | ||
+ | ); | ||
+ | }, | ||
+ | function(){ | ||
+ | $(this).find("ul.subnav").hide(); | ||
+ | } | ||
+ | |||
+ | ); | ||
+ | } | ||
+ | ); | ||
</script> | </script> |
Revision as of 20:18, 21 October 2011
<script type="text/javascript">
$(document).ready(function() { $("p").filter( function() { return $.trim($(this).html()) == ; }).remove() });
</script>
<script src="http://cdn.jquerytools.org/1.2.5/full/jquery.tools.min.js"></script> <script> $(function() {
// initialize scrollable $(".scrollable").scrollable().navigator();
}); </script>
<script type="text/javascript"> $(window).scroll(function () { var scrollPos = $(window).scrollTop(); if (scrollPos > 110) { $(".navigation").addClass("stickToTop"); } else { $(".navigation").removeClass("stickToTop"); } if (scrollPos > 180) { $(".toc").addClass("stickBelowNavigation"); } else { $(".toc").removeClass("stickBelowNavigation"); } }); </script>
<script type="text/javascript">
$(document).ready(
function(){
$("ul.subnav").parent().find("> a").append(" ▼");
$("ul.topnav li").hover(
function() {
// Hover over
$(this).parent().find("ul.subnav").hide();
$(this).find("ul.subnav").show();
// Hover out
$(this).hover(
function() {
},
function(){
$(this).find("ul.subnav").hide();
}
);
},
function(){
$(this).find("ul.subnav").hide();
}
); } ); </script>