My favorites | Sign in
Project Home Downloads
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 203: Context Menu example has issue with jQuery 1.6.1
2 people starred this issue and may be notified of changes. Back to list
Status:  Verified
Owner:  ----
Closed:  Jul 2011


 
Reported by mrdu...@gmail.com, May 30, 2011
What steps will reproduce the problem?
1. replace 'jquery.min.js' with latest version (1.6.1)
2. run: http://wwwendt.de/tech/dynatree/doc/sample-contextmenu.html
3. open Context menu on any node, it shows undefined (node)

Dynatree is great!
Thanks.
May 30, 2011
#2 mrdu...@gmail.com
btw, I'm using: dynatree-1.1.1, jQuery v1.5.1 and it works.
but not working with jQuery 1.6.1

May 31, 2011
#3 mrdu...@gmail.com
I investigated more & found out this line doesn't work with jQuery 1.6
var node = el.parents("[dtnode]").attr("dtnode");

It seems can't get dtnode attribute from <li> tag (parent of <span> tag). But it works fine with jQuery 1.5. Any idea?
May 31, 2011
Project Member #4 moo...@wwwendt.de
May be related to this:
  http://api.jquery.com/prop/

Does 
  el.parents("[dtnode]")
not return a match, or will
  .attr("dtnode")
not work?
In the latter case, could you try .prop() instead?

Status: Accepted
Labels: -Priority-Medium Priority-High Milestone-Release1.1.2
May 31, 2011
#5 mrdu...@gmail.com
It was the later case.
.prop() works! you are genius :)

API quoted - "Before jQuery 1.6, the .attr() method sometimes took property values into account when retrieving some attributes, which could cause inconsistent behavior. As of jQuery 1.6, the .prop() method provides a way to explicitly retrieve property values, while .attr() only retrieves attributes."

Can you add .prop() to support jQuery 1.6, I don't know if we can check jQuery version or not.
Jun 5, 2011
Project Member #6 moo...@wwwendt.de
Fixed with r496
Jun 5, 2011
Project Member #7 moo...@wwwendt.de
Release 1.1.2 is rather a feature release 1.2.0
Labels: Milestone-Release1.2
Jul 3, 2011
Project Member #8 moo...@wwwendt.de
Using $.ui.dynatree.getNode() may be an even better option ( issue 213 )
Status: Fixed
Jul 17, 2012
Project Member #9 moo...@wwwendt.de
considered verified
Jul 17, 2012
Project Member #10 moo...@wwwendt.de
(No comment was entered for this change.)
Status: Verified

Powered by Google Project Hosting