Re: [jQuery] Disabling a tags

2006-12-13 Thread Sam Collett
On 13/12/06, Brice Burgess [EMAIL PROTECTED] wrote: Joan Piedra wrote: On 12/12/06, *Aaron Heimlich* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: div#myid = SLOW!! #myid = FAST!! .myclass = SLOW!! div.myclass = FAST(er)!! LOL, I think this is

Re: [jQuery] Disabling a tags

2006-12-12 Thread David Duymelinck
Sam Collett schreef: That prevents the link being followed, but still keeps the href the same (incase you want to enable it again). Also, I think it is better performance wise to use '#myid' rather than 'div#myid' I thought div#myid was less generic than #myid so that the performance would

Re: [jQuery] Disabling a tags

2006-12-12 Thread Klaus Hartl
Bruce MacKay schrieb: Hello folks, Another simple question I'm sure. I have a preview page in which I want to display the text of a tags, but to disable the tag by changing its href contents to #. The code I use to populate the div (#preview) after an ajax call is function

Re: [jQuery] Disabling a tags

2006-12-12 Thread Aaron Heimlich
On 12/12/06, David Duymelinck [EMAIL PROTECTED] wrote: I thought div#myid was less generic than #myid so that the performance would improve using something like that. #myid could match a form, a div or some other tag you apply the id to. This might be true in CSS, but when jQuery sees

Re: [jQuery] Disabling a tags

2006-12-12 Thread Klaus Hartl
Aaron Heimlich schrieb: On 12/12/06, *David Duymelinck* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I thought div#myid was less generic than #myid so that the performance would improve using something like that. #myid could match a form, a div or some other tag you apply

Re: [jQuery] Disabling a tags

2006-12-12 Thread Aaron Heimlich
On 12/12/06, Klaus Hartl [EMAIL PROTECTED] wrote: I think it's even worse. It has to go through all the divs and check the id... document.getElementById cannot be used for such a list returned by document.getElementsByTagName(div). Yeesh! NOTE TO ALL: div#myid = SLOW!! #myid = FAST!!

Re: [jQuery] Disabling a tags -- thanks

2006-12-12 Thread Bruce MacKay
Thank you all for the solutions and the additional lesson about div#myID - much appreciated. -- Bruce ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list

Re: [jQuery] Disabling a tags

2006-12-12 Thread Choan C. Gálvez
On 12/12/06, Aaron Heimlich [EMAIL PROTECTED] wrote: On 12/12/06, Klaus Hartl [EMAIL PROTECTED] wrote: I think it's even worse. It has to go through all the divs and check the id... document.getElementById cannot be used for such a list returned by document.getElementsByTagName(div).

Re: [jQuery] Disabling a tags

2006-12-12 Thread Joan Piedra
On 12/12/06, Aaron Heimlich [EMAIL PROTECTED] wrote: div#myid = SLOW!! #myid = FAST!! .myclass = SLOW!! div.myclass = FAST(er)!! LOL, I think this is how it works in real CSS. div#myid = Faster #myid = Slow .myclass = Slow div.myclass = Fast Cheers -- Joan Piedra || Frontend

Re: [jQuery] Disabling a tags

2006-12-12 Thread Brice Burgess
Joan Piedra wrote: On 12/12/06, *Aaron Heimlich* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: div#myid = SLOW!! #myid = FAST!! .myclass = SLOW!! div.myclass = FAST(er)!! LOL, I think this is how it works in real CSS. div#myid = Faster #myid = Slow