cancer10
01-28-2009, 05:24 PM
Hi
I have 3 different images on my page, with same IDs for each. And names for each images as img1, img2, img3 respectively
I am using the following function in jQuery, but for some reason, the alert prompts me with the first image name no matter which image i click.
$(document).ready(function(){
$("#img_skin").click(function(){
alert($("#img_skin").attr("name"));
});
Plz help
Thanx
I have 3 different images on my page, with same IDs for each. And names for each images as img1, img2, img3 respectively
I am using the following function in jQuery, but for some reason, the alert prompts me with the first image name no matter which image i click.
$(document).ready(function(){
$("#img_skin").click(function(){
alert($("#img_skin").attr("name"));
});
Plz help
Thanx