javascript - Owl carousel destroy issue (Uncaught TypeError: Cannot read property 'destroy' of undefined ) -


I am using Owl Hindozel for my project at some resolution, I need to destroy the owl carousel , So I used the owl carousel but the other jquery function is not working even when using the function. The document is also not ready. Please help fix this problem so that I use the flagged carousel to function with jquery Specific to me

This is my code

  Function Mobile () {var Chekwyuth = $ (window). With (); Var banner = $ ("# ndmv-banner-intro"); If (checkwidth> 980) {banner.owlCarousel ({single item: true, autoplay: wrong, drag beer, aniffish: true}); } And {bannerdata ('olucarcarcel'). Destroyed (); Destroy banner.removeClass ('owl-carousel'). }} $ (Document) .ready (mobile); $ (Window) .resize (mobile);   

You are applying a deleted object to an object Which is undefined. You can try to do something like that.

  if (banner.data ('owlCarousel')! = 'Undefined') {banner.data ('owlCarousel'). Destroyed (); Banner.removeClass ('Owl-Carousel'); }    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -