ForFood
(Anton)
April 16, 2016, 12:00pm
1
Hello guys!
1. Strange problem — slider dots in modal don’t appear, but if I make modal display from none to block (so u can see it when site opened) slider dots appeared.
2. Map in modal window doesn’t appear (u can open it by clickin link under H1 heading).
Designer: https://preview.webflow.com/preview/cars-test?preview=830bf7709e1a75f6dbdcea5e8cdcad9a
Live : http://cars-test.webflow.io
samliew
(webflowexpert.com)
April 16, 2016, 12:09pm
2
Preview link is broken until further notice. Please re-post your share link when it is fixed.
ForFood
(Anton)
April 16, 2016, 12:51pm
3
samliew
(webflowexpert.com)
April 16, 2016, 5:42pm
4
Hi @ForFood , I am unable to see your slider and map on the page. Could you add interactions to open your custom modal?
ForFood
(Anton)
April 17, 2016, 2:06am
5
Hm, don’t get it, but made 1 modal visible, it’s slider dots are visible too, but if u close it and open another car, dot’s aren’t visible.
Designer : https://preview.webflow.com/preview/cars-test?preview=830bf7709e1a75f6dbdcea5e8cdcad9a
Live: http://cars-test.webflow.io
samliew
(webflowexpert.com)
April 17, 2016, 4:32am
6
This looks like a bug. Sliders have to be visible in the page on load, otherwise JS error
webflow.35c9bd168.js:3800 Uncaught TypeError: Cannot read property ‘mask’ of undefined
Hi @ForFood , as mentioned by @samliew , since the slider is set to display none on load, the widget does not work as expected when the modal window is opened.
In the custom code where you have the fadein code, replace that with the below:
<script type="text/javascript">
$(document).ready(function() {
$('.car-link-block-1').click(function() {
$('.modal-background-1').fadeIn();
Webflow.require('slider').redraw();
});
$('.close-modal-btn').click(function() {
$('.modal-background-1').fadeOut();
});
});
$(document).ready(function() {
$('.car-link-block-2').click(function() {
$('.modal-background-2').fadeIn();
Webflow.require('slider').redraw();
});
$('.close-modal-btn').click(function() {
$('.modal-background-2').fadeOut();
});
});
$(document).ready(function() {
$('.car-link-block-3').click(function() {
$('.modal-background-3').fadeIn();
Webflow.require('slider').redraw();
});
$('.close-modal-btn').click(function() {
$('.modal-background-3').fadeOut();
});
});
$(document).ready(function() {
$('.adress-link-block').click(function() {
$('.modal-background-4').fadeIn();
Webflow.require('slider').redraw();
});
$('.close-modal-btn').click(function() {
$('.modal-background-4').fadeOut();
});
});
</script>
This code above adds the Webflow.require(‘slider’).redraw(); command to redraw the slider after the modal is opened.
I did not have a chance to check the map yet…
After replacing the code, republish the site. I hope that helps.
2 Likes
ForFood
(Anton)
April 17, 2016, 8:25am
8
Oh, big thanks, it works!
system
(system)
Closed
June 17, 2016, 5:25am
9
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.