[jQuery] Re: Is there a more efficent way to write this script?

2009-07-10 Thread KeeganWatkins
you should be able to include all those elements in a single set, and then apply the styles once. for example: $(this).find(a).css(text-decoration , underline); Note that this will grab ALL the descendant links inside the .JQorangeHighlight element. On Jul 10, 8:33 am, Jacques Choquette -

[jQuery] Re: Is there a more efficent way to write this script?

2009-07-10 Thread Mauricio (Maujor) Samy Silva
$( 'h3 a, a', $(this) ).css('text-decoration', 'underline'); Maurício -Mensagem Original- De: Jacques Choquette - WhistlerGraphicDesign.com Para: jQuery (English) Enviada em: sexta-feira, 10 de julho de 2009 10:33 Assunto: [jQuery] Is there a more efficent way to write

[jQuery] Re: Is there a more efficent way to write this script?

2009-07-10 Thread Michael Geary
Nice. If you need to duplicate exactly the behavior of the .children('h3') in the original code, add another to the selector. Also you can leave out the inner $() call: $( ' h3 a, a', this ).css('text-decoration', 'underline'); Alternatively, write it like this: $(this).find(' h3 a,