javascript - 'fn' is null or not an object in require-jquery.js Line:2813 -


we have wired error not reproduciable rondomly happening. throw error on line/function in jquery: proxy: function( fn, context ) {

here code trigger problem. used screen rotation, throw error in settimeout($.proxy(function... :

    _showpanel: function(index) {         // go first panel, index out of range         var index = (index > this._panels.length - 1) ? 0 : index,          // calculate next panel index             nextindex = (index + 1) % this._panels.length,             panel = this._panels[index],             oldpanelelement = this._currentpanelelement;           // set timer when switch next panel         this._panelrotationtimeout = **settimeout($.proxy**(function () {             if (this && this._showpanel) {                 this._showpanel(nextindex);             }         }, this), panel.time);           // hide old panel         if (oldpanelelement) {             oldpanelelement                 .hide()                 .detach();         }          // show/hide animation         if (panel.animation) {             this._animation.show();         } else {             this._animation.hide();         }          // show new panel         this.element.find('.panelcontainer')             .append(panel.element);         panel.element.show();          // update status , button         this._updatedisplay();          // track current panel details         this._currentpanelindex = index;         this._currentpanelelement = panel.element;          this._currentdevicestatusindex = index;     }, 

settimeout's first argument should function. in example you're calling $.proxy giving settimeout return value of $.proxy function. try passing anonymous function , stuff inside it:

settimeout ( function() { $.proxy ( ... 

Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -