[jQuery] Re: Click Links in the Nnavigation Bar

2009-02-04 Thread Karl Swedberg
On Feb 4, 2009, at 1:09 AM, Pedram wrote: Thanks Karl , It helped me alot Not a problem. Glad to help. Since it's not possible in a valid DOM to have an A that is a descendant of a UL but not a descendant of an LI, the LI is superfluous. No need to do an extra getElementsByTagName there.

[jQuery] Re: Click Links in the Nnavigation Bar

2009-02-03 Thread Pedram
Thanks Karl , It helped me alot On Feb 1, 9:47 am, Karl Swedberg k...@englishrules.com wrote: On Feb 1, 2009, at 3:06 AM, Pedram wrote: I have another  tiny question  $(Ul li a), $(ul a), $(a,$(ul)) which one has the great performance !!? I would go with either $('ul a') or $('a',

[jQuery] Re: Click Links in the Nnavigation Bar

2009-02-01 Thread Pedram
Thanks Karl , You are Right , I appreciate it , thank you again . You are always the solver On Jan 31, 11:54 am, Karl Swedberg k...@englishrules.com wrote: Hi Pedram, I agree with Nic. Especially if you're only dealing with 4 elements,   binding directly on them seems like the most sensible

[jQuery] Re: Click Links in the Nnavigation Bar

2009-02-01 Thread Pedram
I just had some Doubt , the performance is great On Jan 31, 11:54 am, Karl Swedberg k...@englishrules.com wrote: Hi Pedram, I agree with Nic. Especially if you're only dealing with 4 elements,   binding directly on them seems like the most sensible solution. Are you noticing performance

[jQuery] Re: Click Links in the Nnavigation Bar

2009-02-01 Thread Pedram
I have another tiny question $(Ul li a), $(ul a), $(a,$(ul)) which one has the great performance !!? On Feb 1, 12:02 am, Pedram pedram...@gmail.com wrote: I just had some Doubt , the performance is great On Jan 31, 11:54 am, Karl Swedberg k...@englishrules.com wrote: Hi Pedram, I

[jQuery] Re: Click Links in the Nnavigation Bar

2009-02-01 Thread Karl Swedberg
On Feb 1, 2009, at 3:06 AM, Pedram wrote: I have another tiny question $(Ul li a), $(ul a), $(a,$(ul)) which one has the great performance !!? I would go with either $('ul a') or $('a', 'ul'), but $('ul a') seems more readable to me, as it follows the CSS syntax. Since it's not

[jQuery] Re: Click Links in the Nnavigation Bar

2009-01-31 Thread Pedram
I'm looking to improve the performance , which of these 2 codes has the best performance. On Jan 30, 1:04 am, Nic Luciano adaptive...@gmail.com wrote: What exactly are you trying to do, what is the issue? Maybe just preference here (and I'm also just guessing what you're asking) but I don't

[jQuery] Re: Click Links in the Nnavigation Bar

2009-01-31 Thread Karl Swedberg
Hi Pedram, I agree with Nic. Especially if you're only dealing with 4 elements, binding directly on them seems like the most sensible solution. Are you noticing performance problems? You shouldn't be seeing any, with scripts this basic. In any case, there are a couple selector

[jQuery] Re: Click Links in the Nnavigation Bar

2009-01-30 Thread Pedram
Dear Karl , I know You are Expert in these Issues do you have any idea for me Thanks On Jan 29, 5:44 pm, Pedram pedram...@gmail.com wrote: Hi Folks ,   I have some links in my Navigation bar such as below , I Used FIND in my code , does anyone has any better solution for me ,   I also used

[jQuery] Re: Click Links in the Nnavigation Bar

2009-01-30 Thread Nic Luciano
What exactly are you trying to do, what is the issue? Maybe just preference here (and I'm also just guessing what you're asking) but I don't see a reason not to put the events on the elements themselves $(ul li a).click(function() {