This works:
$("a.hover").hover(function (){
$(this).css("text-decoration", "underline");
},function(){
$(this).css("text-decoration", "none");
}
);
This doesn't:
$("a.click").click(function (){
$(this).css("text-decoration", "underline");
},function(){
$(this).css("text-decoration", "none");
}
);
I understand it may not be designed to work like this, but why not?
I'm also not entirely sure what having the second function after the comma actually does. I have only ever written it like this:
$("a.click").click(function (){
$(this).css("text-decoration", "underline");
});
http://jsfiddle.net/tmyie/4DygF/7/
Any clarification would be great.