jQuery attr(‘rel’) returning a object instead of value?

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);
});

newest questions tagged jquery – Stack Overflow

About Admin