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:
Text.
Script (untested):
$(function() {
$('input.hasInfo').click( function() {
var infoSpan = $(this).prev('span.in
Hi,
I am creating tooltips for a form. The text that appears in the tooltip will
have two classes:
Text.
Text.
First how can I access all the elements that contain 'info' in their class?
Secondly when the user clicks on the input box i need to access the second
class so i know which on