[jQuery] access an element with 2 classes

2007-02-26 Thread Timothy Bowler
Hi, I am creating tooltips for a form. The text that appears in the tooltip will have two classes: span class=info email-infoText./span span class=info password-infoText./span First how can I access all the elements that contain 'info' in their class? Secondly when the user clicks on

Re: [jQuery] access an element with 2 classes

2007-02-26 Thread Karl Rudd
First bit is easy: // All spans with class=info var infoSpans = $('span.info'); Second bit depends on how you have structured your HTML. Assuming the following HTML: span class=info email-infoText./span input class=hasInfo type=text ... Script (untested): $(function() {