-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
console errors using breakpoints #1511
Comments
Would be good to see live example or JSFiddle with this issue |
I have the same error, when I add breakpoints I get the following error: This is my code:
I will try to add a JSFiddle when I am home again. |
@puredazzle is this JavaScript? What does this syntax mean?
|
@nolimits4web I have the media queries saved in a separate file, which I require in the top of my slider.js. It is es6 code. This is how my media-queries.js looks like:
I have tried with using the break points directly in the Swiper settings also, but same error. |
Ok, but you can't define Object keys like that. If they are dynamic, then it should be something like: var swiperParams = {
speed: 400,
loop: false,
slidesPerView: 3,
nextButton: nextButton,
prevButton: prevButton,
breakpoints: {}
}
swiperParams.breakpoints[mqXs] = {
slidesPerView: 1
};
this.slideshow = new Swiper(slider, swiperParams);
... |
I get the same error if I use:
If it loads and the screen is less then 480px it works, but if it loads and the screen is bigger it fails. |
Then problem somewhere else, as you can see there is no such problem at http://www.idangero.us/swiper/demos/33-responsive-breakpoints.html Would be good to see live example |
I will try to upload a live example. It seems like the error first triggers in |
I, too, can confirm this is an issue. It specifically occurs when you pass a DOM-node as the next and/or prev button; when you pass a selector, all is well. This is problematic because you need to pass a DOM node if you have multiple swiper instances on the page. fiddle to play with. Comment/uncomment the current next-prev button config parameters. The problem seems to be an object that's being passed to jQuery instead of a DOMnode by the swiper, causing the browser to throw an error because jQuery in turn tries to map an event to this object. |
@quintenvk thanks for the fiddle, now it is fixed in dev |
Now, it is throwing error: Uncaught TypeError: Cannot read property 'nodeType' of null |
Actually, its working fine. It was confused with selector I used ID instead of class and it worked like a charm! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
i have an issue using breakpoints. when i define some breakpoints for a carousel i get this errors in console:
i have also notice that console errors are shown in reference to the largest size specified for the breakpoints.
for example if i set two breakpoint one
320px
and another one at550px
, console error shows up:same issue with swiper.jquery version with the following error
how i can prevent or fix this issue?
The text was updated successfully, but these errors were encountered: