small code work in all browser but IE, particularly IE8
- jQuery.fn.hoverToggleClass = function(class){
- return this.live('mouseover mouseout',function(e){
- if(e.type=='mouseover'){
- $(this).addClass(class);
- }else{
- $(this).removeClass(class);
- }
- });
- }
The code is too simple to cause a problem i think, but in IE8 it says "expected identifier". I have no idea what it wants.