[jQuery] Re: Help with selecting great grandchildren

2008-05-02 Thread BlueCockatoo
You could use $(".line-item", $(this).parent()) which brings back all .line-items under the context of the parent or you could use $(this).parent().find(".line-item") which searches for any .line-items under the parent. Either one should work, so pick your favorite :) - Lindsay On May 2, 12

[jQuery] Re: How do I cancel event helpers?

2008-05-02 Thread BlueCockatoo
Here's some info on how event binding works in jQuery: http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F But specifically you can use .hover() and .unbind("hover") on your element to bind and unbind. On May 2, 11:41 am, jr <[EMAIL PROTECTED]

[jQuery] Re: Ajax .click function after .get

2008-05-02 Thread BlueCockatoo
Come on, be nice to noobies even if you have seen the same question asked over and over. Everyone has to get started somewhere and what you're referring to isn't even in the API reference where I would look first for answers (and where search takes you if you type "events"), its in the FAQ. It mi

[jQuery] Re: adding a callback function?

2008-05-02 Thread BlueCockatoo
This may work for you. You actually create the function in the config options you pass to the control. I changed the reference in the setup and in the adjustValue functions as well. This isn't tested but hopefully should work. var myOptions = { min: 0,

[jQuery] Re: event binding on dynamically created elements? stumped

2008-05-02 Thread BlueCockatoo
You can put the event handler anywhere you want if it doesn't have to be an anonymous function. Here's the example I gave modified: // put this in your ready block $j('').insertAfter(this).focus(focusEventHandler); // put this wherever you want function focusEventHandler() { $(this).val('')

[jQuery] Re: event trigger doesnt work ?

2008-05-02 Thread BlueCockatoo
I'm not sure that jQuery picks up on events that weren't assigned through jQuery... Maybe it does but I've only been using it as "unobtrusive javascript" and so haven't tried to trigger an event that I didn't bind through jQuery yet. Try this and see if it doesn't work for you instead: $(docume

[jQuery] Re: event binding on dynamically created elements? stumped

2008-05-01 Thread BlueCockatoo
I haven't tested this but it might work for you: $j('').insertAfter(this).focus(function(){ $(this).val(''); }); That should have the right context (your new node, not this) and you don't have to look it up again in another line. HTH! On May 1, 5:07 pm, jquertil <[EMAIL

[jQuery] ready firing twice on the page

2008-05-01 Thread BlueCockatoo
Hi all, I am trying to load some partials on page load and they are not necessarily aware of each other (different people will be developing them and they're pulled together on a page before sending to the client). Since it's designed this way there is a $(document).ready block on each partial w