Cannot read property 'children' of null at object.Iscroll -


i know question asked before answers not helpful me.here i'm using iscroll, console error "cannot read property 'children' of null @ object.iscroll" when reloading page. can me.

function iscroll (el, options) {     this.wrapper = typeof el == 'string' ? document.queryselector(el) : el;     this.scroller = this.wrapper.children[0];     this.scrollerstyle = this.scroller.style;       // cache style better performance      this.options = {          resizescrollbars: true,          mousewheelspeed: 20,          snapthreshold: 0.334,  // insert point: options           startx: 0,         starty: 0,         scrolly: true,         directionlockthreshold: 5,         momentum: true,          bounce: true,         bouncetime: 600,         bounceeasing: '',          preventdefault: true,         preventdefaultexception: { tagname: /^(input|textarea|button|select)$/ },          hwcompositing: true,         usetransition: true,         usetransform: true     };      ( var in options ) {         this.options[i] = options[i];     }      // normalize options     this.translatez = this.options.hwcompositing && utils.hasperspective ? ' translatez(0)' : '';      this.options.usetransition = utils.hastransition && this.options.usetransition;     this.options.usetransform = utils.hastransform && this.options.usetransform;      this.options.eventpassthrough = this.options.eventpassthrough === true ? 'vertical' : this.options.eventpassthrough;     this.options.preventdefault = !this.options.eventpassthrough && this.options.preventdefault;      // if want eventpassthrough have lock 1 of axes     this.options.scrolly = this.options.eventpassthrough == 'vertical' ? false : this.options.scrolly;     this.options.scrollx = this.options.eventpassthrough == 'horizontal' ? false : this.options.scrollx;      // eventpassthrough need lockdirection mechanism     this.options.freescroll = this.options.freescroll && !this.options.eventpassthrough;     this.options.directionlockthreshold = this.options.eventpassthrough ? 0 : this.options.directionlockthreshold;      this.options.bounceeasing = typeof this.options.bounceeasing == 'string' ? utils.ease[this.options.bounceeasing] || utils.ease.circular : this.options.bounceeasing;      this.options.resizepolling = this.options.resizepolling === undefined ? 60 : this.options.resizepolling;      if ( this.options.tap === true ) {         this.options.tap = 'tap';     }      if ( this.options.shrinkscrollbars == 'scale' ) {         this.options.usetransition = false;     }      this.options.invertwheeldirection = this.options.invertwheeldirection ? -1 : 1;  // insert point: normalization      // defaults         this.x = 0;     this.y = 0;     this.directionx = 0;     this.directiony = 0;     this._events = {};  // insert point: defaults      this._init();     this.refresh();      this.scrollto(this.options.startx, this.options.starty);     this.enable(); } 

the above issue fixed, undefined value stored in 'el',i fix it, working fine, views.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -