JQuery - Find the first identical class after a specific class.
- by WEBProject
Hi guys,
lets say I have this divs:
<div class="item current"><strong>Example 1</strong></div>
<div class="item"><strong>Example 2</strong></div>
Im have this code:
var News = {
init : function(){
$('#news-content')
.find('.item:first-child')
.addClass('current')
.show('slide',{direction:"up"},500);
$('#news-content')
.find('.item:first-child')
.addClass('current')
.delay(1000)
.hide('slide',{direction:"down"},500);
this.show()
},
show : function() {
// ...
}
}
$(document).ready(News.init)
After the init - I want to catch the next "item" after "current" class and make the same operation as "init" on it. how can I do it with jquery?