jQuery: Checking if next element exists
Have you tried looking at .next('li').length
?
Use jQuery .is()
, using .is()
you can even check what tag, class or ID next element have?
if($("#people .making-of .mask ul li.current").next().is('li')) {
alert("Exists");
}
else {
alert("Dont exists");
}