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'); });
and doesn't work, if change places icon-chevron, works:
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); });