Toggle Image
Toggle Image
hello i got the following situation
Ive got an link which opens a div onclick
This link has a class for an image.
Now i want to change this image if the div is opened or closed.
Jquery has to change the class of the link between "open" and "close"
I cant get it working
Here is the link:
<a onclick="ShowHide('#box-ext-order-id'); return false;" href="#" class="open"> </a>
Here is the jquery script that opens the div
function ShowHide(divid){
$(divid).animate({"height": "toggle"}, { duration: 200});
}
Anybody an idea how I can change the class of the link?
There are also some other boxes so I can not replace all classes. Only the one of the link i just clicked on
many Thanks