It's hard to diagnose your problem without seeing more of your code, but for the second part, assuming ClickIMG is a function you've defined, try this:
Instead of... $('.Pics').Click('ClickIMG');
Try... $('.Pics').click(ClickIMG);
(Lower-case c in click, and no quotes around 'ClickIMG'.)
Comments 3
Instead of...
$('.Pics').Click('ClickIMG');
Try...
$('.Pics').click(ClickIMG);
(Lower-case c in click, and no quotes around 'ClickIMG'.)
Reply
To get the value of some attribute just use $(this).attr('id')
For example, when you want to get the id of your image when it's been clicked, write something like that:
$('.Pics').live('click',function(e){
alert('The class of the clicked element is: ' + $(this).attr('class');
});
Reply
Reply
Leave a comment