On 8/8/07, voltron <[EMAIL PROTECTED]> wrote: > > > Excuse my newbiness, how do I select a particular attribute of an > element? > > Example: > > <li test1 ="foo" test2="bar"> foobar</li> > > how do I select and return the test1 attribute?
var test1val = $("li").attr('test1');
alert(test1val == "foo");
See http://docs.jquery.com/DOM/Attributes#attr.28_name_.29
- Richard

