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
Have you tried looking at .next('li').length?
.next('li').length