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(); } 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -