$('#rm-css-launch').removeClass('disabled').attr('href', '#launch-css').bind('click', function (event) {
$(event.currentTarget).siblings().removeClass('active').end().addClass('active');
RMUIWidgetRelay.relayEvent(RMUIEvent.EDITOR_MODE_CHANGE, 'css');
alert("Test");
return false;
});
答案 0 :(得分:1)
阅读以下代码中的评论。
$('#rm-css-launch').removeClass('disabled')
.attr('href', '#launch-css')
.bind('click', function(event){
//IE7 & IE8 do not support the method 'event.currentTarget';
//use 'this' instead.
$(this).siblings().removeClass('active').end().addClass('active');
RMUIWidgetRelay.relayEvent(RMUIEvent.EDITOR_MODE_CHANGE, 'css');
alert("Test");
return false;
});