In following code $ (this).attr(‘rel’) return a object instead of value of rel attr, do you have any idea?
Thanks in advance
HTML:
<a rel="1620" name="delete_this" href="javascript:void(0);">x</a>
Javascript:
$ ('a[name="delete_this"]').click(function (){
var image_name = $ (this).attr('rel');
alert(image_name);
});