[jQuery] Re: Adding selectors to $(this)?

2009-10-19 Thread Matt
Thanks James, the context parameter was what I needed. ui.item is an object returned by Sortable containing the elements used in sorting. On Oct 13, 10:40 pm, James james.gp@gmail.com wrote: The jquery selector has a second parameter

[jQuery] Re: Adding selectors to $(this)?

2009-10-14 Thread Richard D. Worth
On Tue, Oct 13, 2009 at 6:49 AM, Matt guitarroman...@gmail.com wrote: What I want, though, is to add this class to the h3 within my li. I tried: receive: function(event, ui) { $(ui.item + ' h3').addClass('editable');

[jQuery] Re: Adding selectors to $(this)?

2009-10-13 Thread James
The jquery selector has a second parameter 'context': http://docs.jquery.com/Core/jQuery#expressioncontext such that if defined it will only select what's a descendant of that element. You can also use find(): http://docs.jquery.com/Traversing/find#expr By the way, what is ui.item? An object?