Reputation: 299
I have this section:
<div id="weather">
<h4><i class="icon-chevron-down"></i> Weather</h4>
and code to this:
$('#weather h4').click(function (){
$('#weather .entries').toggle();
$('#weather .icon-chevron-down').toggleClass('icon-chevron-right');
});
and it doesn't work, but if I change places for icon-chevron, it works:
is it a bug or am I doing something wrong??
Upvotes: 3
Views: 2501
Reputation: 4063
This one is 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);
});
Upvotes: 1