Hi,
I want to fire a function when an image is clicked, and that function will hit a URL passing it a parameter and then update the containing div's class with the value I get back from the URL.
Can someone help me with code for this?
My DOM looks like:
<div class="c1"><img src="/images/hello.jpg"/></div>
My URL is http://www.example.com/ajax/image.aspx?className=c1.
So I want to go to that url using a ajax request passing it the current class name, and then it will return e.g. c2
. I then update the div's class to c2
using a callback.