Side navigation
#11615 closed bug (duplicate)
Opened April 20, 2012 08:42PM UTC
Closed April 20, 2012 09:34PM UTC
Last modified April 20, 2012 09:34PM UTC
jquery-1.7.2 selector incorrect
Reported by: | rdewaal1@gmail.com | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hi, I installed 1.7.2 just a few days ago, and found an issue you should know about. I have a selector and calling the attr() method, and instead of returning the value of the attribute requiested, it's returning the entire selector object. When I rolled jquery back to 1.7.1, it behaved correctly as it always has.
HTML snippet:
...in my jquery, I try to grab the "state" attribute of #showRpt...
<div id="showRpt" state="-">Show Report</div> <div id="rptTab" class="hideThis"> <cfset GetReport()> </div>
jQuery (in my document ready handler):
$("#mainTable #showRpt").bind("click", function(wcoEvent) { /*...right here, this broke. Very simple, always used to work, now my variable wsState becomes the wcoEvent.currentTarget (this) object, and not the state attribute value of the object...*/ var wsState = $(wcoEvent.currentTarget).attr("state"); if(wsState == "-") { $(wcoEvent.currentTarget).attr("state", "+").html("Hide Report"); $("#mainTable #rptTab").removeClass("hideThis"); } else if(wsState == "+") { $(wcoEvent.currentTarget).attr("state", "-").html("Show Report"); $("#mainTable #rptTab").addClass("hideThis"); } });
Thanks.
P.S. Love jQuery, couldn't live without it!
Sounds like you need to update your TinyMCE.