FancyBox, Obtaining an ATTR of the item clicked

Posted by nobosh on Stack Overflow See other posts from Stack Overflow or by nobosh
Published on 2010-03-28T17:57:14Z Indexed on 2010/03/28 18:03 UTC
Read the original article Hit count: 258

I have the following lines of code:

    $("a.quickview").fancybox({
        ajax : {
            type    : "POST",
            data    : 'itemID=' + $(this).attr("name")
        }
    });

Which is binding on:

<a name="614" class="quickview" href="/URL/index.cfm">quick view</a>

I want data to post as itemID=614, but $(this).attr("name") is coming back as undefined? What am I doing wrong?

Thanks

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about fancybox