[Solved] javascript get the current class number [closed]


Its Very Simple:

Just Use .html() , .index() , .text() with the selector

Like This Fiddle:

http://jsfiddle.net/PzWxs/5/

Here is the Code :

   var currentClassValue = $('li.current').html();  
      alert(currentClassValue);

OR

   var currentClassValue = $('li.current').index();  
      alert(currentClassValue);

OR

   var currentClassValue = $('li.current').text();  
      alert(currentClassValue);

Use any one of the above you like 🙂

5

solved javascript get the current class number [closed]