[jQuery] Re: Issues with Backwards Traversing the DOM

2008-03-07 Thread David Stamm
This code worked for me: $(#mainCol ul li a).each(function() { var headerText = $(this).parent().siblings(h1).text(); $(this).attr(title, headerText ); }); Also, you might want to consider using something other than an h1 tag. Strictly speaking, that tag is supposed to

[jQuery] Re: Function overriding

2008-03-03 Thread David Stamm
The function sayHello() is defined inside the function jQuery.example, and is thus an inner function or nested function. It exists only when jQuery.example is executing. It cannot be accessed from outside jQuery.example without doing some magic with closures. When you tried to override

[jQuery] Re: dblclick function bind and content selection

2008-03-03 Thread David Stamm
I tried to find a solution involving the event object's preventDefault() and stopPropagation() methods, but I couldn't get it to work. I was able to get the desired behavior with this tiny but excellent plugin: http://www.jdempster.com/category/jquery/disableTextSelect/ Hope that works for you!