Help on jquery
Help on jquery
Hi all,
I'm just learning jquery.
This is a part of my htlm code
-
<div class="photo">
<a href="#turtles">
<img src="2709825025_fb6d71b455_s.jpg" alt="Github helmet">
</a>
</div>
<div class="photo" style="text-align:right">
<a href="#turtles2">
<img src="fb6d71b455_s.png" alt="Github helmet">
</a>
</div>
My jquery code :
-
$(document).ready(function()
{
$('div.photo a').test();
});
an the test function :
-
jQuery.fn.test = function(options)
{
this.each(function(i)
{
// HERE, I would like to access to the img
}
return this;
}
I would like to access to the img in the each function, but I don't know the syntax.
Can you help me ?
Thanks for your answer
Best regards