Advertisement
Guest User

Untitled

a guest
May 26th, 2015
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!--<script type="text/javascript">
  2.  
  3. $(document).ready(function() { 
  4.   //Get all the LI from the #tabMenu UL
  5.   $('#tab-menu > li').click(function(){
  6.     //remove the selected class from all LI    
  7.     $('#tab-menu > li').removeClass('selected');
  8.     //Reassign the LI
  9.     $(this).addClass('selected');
  10.     //Hide all the DIV in .tab-content
  11.     $('.tab-content div.tab').slideUp('slow');
  12.     //Look for the right DIV in boxBody according to the Navigation UL index, therefore, the arrangement is very important.
  13.     $('.tab-content div.tab:eq(' + $('#tab-menu > li').index(this) + ')').slideDown('slow');
  14.   }).mouseover(function() {
  15.     //Add and remove class, Personally I dont think this is the right way to do it, anyone please suggest    
  16.     $(this).addClass('mouseover');
  17.     $(this).removeClass('mouseout');  
  18.   }).mouseout(function() {
  19.     //Add and remove class
  20.     $(this).addClass('mouseout');
  21.     $(this).removeClass('mouseover');    
  22.   });
  23. });
  24.  
  25.  
  26. $(function() {
  27.             var offset = $("#tab-menu").offset();
  28.             var topPadding = 15;
  29.             $(window).scroll(function() {
  30.                 if ($(window).scrollTop() > offset.top) {
  31.                     $("#tab-menu").stop().animate({
  32.                         marginTop: $(window).scrollTop() - offset.top + topPadding
  33.                     });
  34.                 } else {
  35.                     $("#tab-menu").stop().animate({
  36.                         marginTop: 0
  37.                     });
  38.                 };
  39.             });
  40. });
  41. </script> -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement