jquery - making first tab active using jscrollpane -


hi there got jscrollpane can't figure out how make first tab active , not show information until clicked. know code have put dont know or have take out make work

$(function() { // create "tabs" $('.tabs').each( function() {

  var currenttab, ul = $(this);   $(this).find('a').each(    function(i)    {     var = $(this).bind(      'click',      function()      {       $("ul.tabs li:first").addclass('active').show();       if (currenttab) {        ul.find('a.active').removeclass('active');         $(currenttab).hide();       }       currenttab = $(this).addclass('active')           .attr('href');       $(currenttab).show().jscrollpane();       return false;      }     );     $(a.attr('href')).hide();     }    );  } ); 

});

$('.tabs').each(     function()     {         var currenttab, ul = $(this);         $(this).find('a').each(             function(i)             {                 var = $(this).bind(                     'click',                     function()                     {                         if (currenttab) {                             ul.find('a.active').removeclass('active');                             $(currenttab).hide();                         }                          currenttab = $(this).addclass('active')                                         .attr('href');                         $(currenttab).show().jscrollpane({                                         showarrows: true,                                         verticalgutter: 10,                                         animatescroll: true,                                         verticaldragminheight: 34,                                         verticaldragmaxheight: 34                         });                         return false;                     }                 );                 $(a.attr('href')).hide();             }         );     } ).find('a:first').trigger('click'); 

using ('a:first') instead of .first() worked me.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -