Fancybox: Get id of clicked anchor/element
Posted
by kastru
on Stack Overflow
See other posts from Stack Overflow
or by kastru
Published on 2010-06-02T20:50:54Z
Indexed on
2010/06/02
20:54 UTC
Read the original article
Hit count: 177
I am trying to get the id of the clicked/shown element in fancybox. I have tried both "this.id" and "this.attr("id")" - but none of them works.
$("a.lightbox_image").fancybox({
'transitionIn': 'elastic',
'transitionOut': 'elastic',
'speedIn': 600,
'speedOut': 200,
'content': 'Id of element clicked'+this.attr("id")
});
Any suggestions?
© Stack Overflow or respective owner