SyntaxFix
Write A Post
Hire A Developer
Questions
Try negation operator ! before $(this):
!
$(this)
if (!$(this).parent().next().is('ul')){