Stupid question time - how do you update the title attribute of a control? Obviously this does not work:
$("#valPageIndex").attr('title') = pageIndex;
TIA
Stupid question time - how do you update the title attribute of a control? Obviously this does not work:
$("#valPageIndex").attr('title') = pageIndex;
TIA
$("#valPageIndex").attr('title', pageIndex);
Basically, $("#valPageIndex").attr('title')
is just for getting its value, while $("#valPageIndex").attr('title', value)
is for setting it.
Here's the official doc: http://docs.jquery.com/Attributes/attr.
$("#valPageIndex").attr('title', pageIndex);
http://docs.jquery.com/Attributes/attr#keyvalue
A common jQuery convention is to have .foo()
or .foo('selector')
act as a getter and .foo(value)
or .foo('selector', value)
act as a setter.