javascript - If class other than my class is present -
i have dynamic list looks
<li>item 1</li> <ii>item 2</li> <ii class="route2">item 2</li> <ii>item 3</li> <ii>item 4</li>
and 2 buttons
<button>route one</button> <button>route two</button>
i can't work how show route 2 button if list items have route2 class.
this should work:
if ( $('li').not('.route2').length ){ $('button').hide(); }