I have this simple toggle function to open/close information. I want to add a image next to it so that it shows expanded or closed. I tried this method but nothing is happening. What am I missing?
$('#slick-software').click(function() {
$('#slickbox-software').toggle(400);
$('#slick-img').attr('src') == "/images/up.png" ? "/images/down.png" : "/images/up.png";
return false;
});
...
...
<a href="#" id="slick-software">
<img id="slick-img" src="/images/up.png" border="0" align="absmiddle" />
<b>Software</b><br>
</a>
<div id="slickbox-software">
text here
</div>
Thanks for your help.