Opened 11 years ago
Closed 11 years ago
#12631 closed bug (notabug)
attr no longer seems to work
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.8.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Since upgrading to jQuery v1.8.2, I am noticing problems with my web site and these usually seem to relate to the use of .attr.
For example, $(this).attr('id') or $(IdOfField).attr('class') is not retrieving the id or class.
Is this a bug?
Change History (10)
comment:1 Changed 11 years ago by
Owner: | set to stephen@… |
---|---|
Status: | new → pending |
comment:2 Changed 11 years ago by
I encountered this bug as well: $(this).attr('class') returns the jQuery object of $(this), not the attribute string. I can in some cases avoid this by getting the DOM property with .prop() instead of the attribute string, but this is not always desirable.
comment:3 Changed 11 years ago by
Apparently this is not jQuery v1.8.2 bug since I am encountering it on 1.7.2 as well. This happens on Chrome 22.0.1229.79 m but not on latest Firefox. Maybe a Chrome bug?
comment:4 Changed 11 years ago by
No wait, it happens on Firefox too, my bad... But it happens in 1.7.2 as well. 1.6.4 works fine.
comment:6 Changed 11 years ago by
Fixed link directly to the comment in question... 1.7.2 release notes page.
comment:7 Changed 11 years ago by
I believe this ticket is invalid. TinyMCE breaks .attr for jQuery 1.7.2+ before version 3.5.4. So updating TinyMCE fixes this.
comment:8 Changed 11 years ago by
Thanks akumpulainen@…! We suspect the same too but we'll wait to see if Stephen can produce a test case before closing this bug.
comment:9 Changed 11 years ago by
I am using TinyMCE v.3.4.2, and the previous version of jQuery that I was using was 1.7.1. I have had to revert to 1.7.1 because of this problem. I will have a look at upgrading TinyMCE. Was that just a guess that I was using TinyMCE, or is this problem specifically related to the use of TinyMCE? Thanks.
comment:10 Changed 11 years ago by
Resolution: | → notabug |
---|---|
Status: | pending → closed |
Related to TinyMCE specifically.
Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket!
Additionally, be sure to test against the "jQuery (edge)" version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to begin.