tags:

views:

36

answers:

2

For example, one of them has this:

<div id="hat" re="mouse" > text here </div>

$(.#hat).re = ??????
+2  A: 

If you want to update the value of the re attribute simply write this:

$('#hat').attr('re', 'newValue');
Matt Kauffman
how do i GET the value?
TIMEX
the value would be $('#hat').attr('re')
Matt Kauffman
+3  A: 

$('#hat').attr('re');

will get it

$('#hat').attr('re', 'blah');

will set it

Colin