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

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

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