i have this html:
<ul class="cont_ul4">
<li class="cont_li">
<div class="cont_picture">
<a href=""><img src="1.jpg" width="150" height="225" ></a>
</div>
</li>
<li class="cont_li">
<div class="cont_picture">
<a href=""><img src="2.jpg" width="150" height="225" ></a>
</div>
</li>
</ul>
and this function:
function ajax_request() {
$('#placeholder').html('<p><img class="loader" src="/loader.gif"></p>');
$('#placeholder').load("/test.php?id=1234556");
}
what i need is when i click on the image to trigger this function.
with an input button i could do this:
<input type="button" onclick="ajax_request()" value="Click Me!" />
any ideas? Thanks
click()event handler to it: api.jquery.com/click