Is there a way to check if an next element exists? Check my code:
if($(\"#people .making-of .mask ul li.current\").next(\"li\") != null) { alert(\"Exists
Like the post above says, you need to check the length of the item. Jquery.next() will always return a jquery object, but if there is no next item, it will have a length of 0.
if($("#people .making-of .mask ul li.current").next("li").length > 0) { alert("Exists"); } else { alert("Dont exists"); }