Hi,
My dom looks like this:
<div class="profile">
<a href="#"><img src="/img1.gif" /></a> <b>100</b>
<a href="#"><img src="/img2.gif" /></a>
</div>
Ok so I have many of these elements on my page, so using jQuery I bind all the events like this:
$(".profile").live('click', myCallback);
var myCallback = function(event) {
// ??
};
Now, when someone clicks on the 1st hyperlink, I want to change the image to "/img1_on.gif", then make a ajax call to a webpage and replace the value between the with the value returned.
The same thing happends when the other image is clicked, except the image changes to "/img2_on.gif" and it goes to another URL.
Would it be easier if I converted the into a div and add some css?