jquery - Bootstrap chevron icon doesn't change onclick, why? -


i have section:

<div id="weather"> <h4><i class="icon-chevron-down"></i> weather</h4> 

and code this:

$('#weather h4').click(function (){     $('#weather .entries').toggle();     $('#weather .icon-chevron-down').toggleclass('icon-chevron-right'); }); 

jsbin1

and doesn't work, if change places icon-chevron, works:

jsbin2

is bug or doing wrong??

this 1 working:

http://jsbin.com/omerep/1/edit

$('#weather h4').click(function (){     $('#weather .entries').toggle();     $(this).find('i').toggleclass('icon-chevron-right icon-chevron-down', 200); }); 

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 -