“element.dispatchEvent is not a function” js error caught in firebug of FF3.0

后端 未结 5 1237
别那么骄傲
别那么骄傲 2020-12-08 01:46

i am getting the following error while loading my index page in FF3.0. Sorry, i am unable to paste the script here as it is 2030 lines of code.

elemen

5条回答
  •  萌比男神i
    2020-12-08 02:30

    are you using jquery and prototype on the same page by any chance?

    If so, use jquery noConflict mode, otherwise you are overwriting prototypes $ function.

    noConflict mode is activated by doing the following:

    
    
    

    Note: by doing this, the dollar sign variable no longer represents the jQuery object. To keep from rewriting all your jQuery code, you can use this little trick to create a dollar sign scope for jQuery:

    jQuery(function ($) {
        // The dollar sign will equal jQuery in this scope
    });
    
    // Out here, the dollar sign still equals Prototype
    

提交回复
热议问题