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? -

java - How to create Table using Apache PDFBox -

mpi - Why is MPI_Bsend not returning error even when the buffer is insufficient to accommodate all the messages -