Re: [jQuery] How can I get a second children element?

2007-03-24 Thread Evan
You could also use get(), though it's probably slower $('div').children().get(1); On Mar 24, 3:04 pm, Karl Rudd [EMAIL PROTECTED] wrote: Have read of this page: http://docs.jquery.com/Selectors#CSS_Selectors Especially E:nth-child(n) Karl Rudd On 3/24/07, MARIO MOURA [EMAIL

Re: [jQuery] How do I, record what item was clicked

2007-03-23 Thread Evan
Something like this should work, assuming you want it to apply to only those 2 elements. $(document).ready(function() { $('#one, #two').click(function() { var id = $(this).attr('id'); alert(id + ' was clicked.'); } } ); On Mar 24, 5:28 am, Scottus [EMAIL PROTECTED] wrote:

Re: [jQuery] return false

2007-03-23 Thread Evan
By putting return false, you're preventing the default behaviour of the anchor, otherwise it would still fire like a normal link. Alternatively, you could use another element (like a span, styled like an anchor) to achieve the same effect. On Mar 24, 8:30 am, Sebastián V. Würtz [EMAIL PROTECTED]