66
rated 0 times
[
71]
[
5]
/ answers: 1 / hits: 32501
/ 13 Years ago, fri, november 4, 2011, 12:00:00
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
More From » jquery