Simple JQuery question - how do you add value to title attribute?
3 answers
$("#valPageIndex").attr('title', pageIndex);
Basically, it is $("#valPageIndex").attr('title')
intended to get its value, and $("#valPageIndex").attr('title', value)
- to set it.
Here's the official doc: http://docs.jquery.com/Attributes/attr .
+8
a source to share
$("#valPageIndex").attr('title', pageIndex);
http://docs.jquery.com/Attributes/attr#keyvalue
A general convention for jQuery is to .foo()
either .foo('selector')
act as a receiver and .foo(value)
or .foo('selector', value)
act as a setter.
+2
a source to share