I have a link which when clicked will change its state like so:
$('.last_link').bind("click", function() {
$(this).css({"color" : "#BBB", "cursor" : "default"});
});
However, if I click another link within that link set, it still retains that state. What I like to happen is for the link to go back to its previous state when I click another link.
Instead of re-setting the previous state of .last-link when I click the other links, is there a better, more efficient way to just revert back to this selector’s original state?
(Edit: Let’s say I have other methods inside that function apart from .css() like I have a chain of methods.)
http://jsfiddle.net/majidf/4r6XN/