开发者

Firebug: "invalid regular expression flag h" after running YUI Compressor

开发者 https://www.devze.com 2023-02-11 23:34 出处:网络
After I run YUI Compressor, I\'m getting this error: invalid regular expression flag h [Break On This Error] ction(event){$(this).removeClass(\'lumi...cs_glb.php</b> on line <b>221</b&

After I run YUI Compressor, I'm getting this error:

invalid regular expression flag h
[Break On This Error] ction(event){$(this).removeClass('lumi...cs_glb.php</b> on line <b>221</b><br/>

The part of the JS code in questions is:

//Form LUMI
$('input').focus(function(event){
    $(this).addClass('lumi');
});

$('input').blur(function(event){
    $(this).removeClass('lumi');
});

I validated the JS code wit开发者_开发问答h http://www.javascriptlint.com/online_lint.php and it points no error.

Does anybody knows what's wrong?


After trying one thousand ways to debug this, I found out that a php warning was causing the error. It is hard to find this kind of error because the Firebug debugger was pointing to a totally different direction. Thanks.

0

精彩评论

暂无评论...
验证码 换一张
取 消