Use: $(this).attr
instead of this.attr
This forces it into the context of jQuery.
More Related Contents:
- Unable to set data attribute using jQuery Data() API
- Select elements by attribute
- How to change an element’s title attribute using jQuery
- jQuery recursive iteration over objects
- jQuery attribute name contains
- Removing html5 required attribute with jQuery
- Fancybox2 – different content for tooltip and image title, both from title attribute?
- A cleaner way to select by multiple possible attribute values?
- How can I check if a value is a JSON object?
- How to remove disabled attribute with jQuery (IE) [duplicate]
- jQuery change input type
- Build image slider with carouFredSel with this requirements? [closed]
- How to disable anchor “jump” when loading a page?
- How to change page in jQuery mobile (1.4 beta)?
- Detecting attribute change of value of an attribute I made
- jQuery: how to trigger anchor link’s click event
- Add and remove a class on click using jQuery?
- jQuery – auto size text input (not textarea!) [duplicate]
- Problems with Google Maps API v3 + jQuery UI Tabs
- Number nested ordered lists in HTML
- return false from jQuery click event
- Get height of div with no height set in css
- How to use jQuery to show/hide divs based on radio button selection?
- jquery nth child that is currently visible
- Resize event firing multiple times while dragging the resize handle
- Post JSON to Python CGI
- jQuery get input value after keypress
- Detect user scroll down or scroll up in jQuery [duplicate]
- Get bottom and right position of an element
- jqGrid with automatic height; but has a max height & scrollbars