Hi,
I am trying to reset a class for any links that have been previously selected by removing the end of a class name.
When the link is clicked on the class is appended with "_selected" so that the image remains highlighted. When another link is clicked on, I am trying to remove "_selected" from any link that may have been selected previously (many rollovers on the page).
Seems like the following should work:
$('a').attr('class').replace(/_selected/g, '');
Doesn't this look for all links with classes and replace instances of "_selected" with nothing?
Is there a better way to look at this? New to jQuery... Thanks