Using jQuery, I am binding some image tags with a click event like this:
$('.imageClass > a > img').bind('click', onImageClick);
this.onImageClick = function() {
$.post("/blah/123", { test : 'a' }, function(data) { myCallback(this, data); }, "json");
}
this.myCallback(event, data) {
alert($(event).parent.attr("href"));
};
My DOM looks like this:
<div class="imageClass">
<a href="#"><img src="/images/1.jpg" alt="1"></a> <strong>hello</strong>
<a href="#"><img src="/images/2.jpg" alt="2"></a>
</div>
I want to alter the text 'hello' in mycallback somehow using data.Message
I can't seem to pin point the strong tag, and i'm not sure if I am passing the correct value into mycallback either!