Parallax doesn't updating after change height block
See original GitHub issueI have jQuery script which opened and closed block. After opening parallax doesn’t show, I read need use resize trigger but it not help me. There is my code
$('.openmore').click(function () { $('.lightdiv').slideToggle(); if ($(this).html() == 'Show more') { $(this).html('Close'); } else { $(this).html('Show more'); } $(window).trigger('resize'); });
Thank. you.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top Results From Across the Web
Parallax scrolling – decrease height of container to match ...
First I changed the way the event is triggered. Since it is a parallax I made it bound to the wheel event rather...
Read more >Parallax Mapping (Height Map) not working anymore after ...
Hi there, I am currently facing a weird problem, that occured after updating from the 2020 LTS version of unity to the 2021...
Read more >JS Animated. How to change the parallax block dimensions
The width and height of the parallax block are defined by the dimensions of the container it is added to. The dimensions can...
Read more >“Parallax” not working on mobile after update | WordPress.org
Hello. I recently updated my SiteOrigin Builder plugin to the latest and noticed that the “Parallax” that i have for mobile views is...
Read more >Parallax scrolling in version 7.0 - Squarespace Help Center
Because of this, cropping and focal point changes may not have a noticeable impact on a parallax scrolling image's position. Your site is ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I can answer On my question myself, I write
$('.lightdiv').slideToggle();
slideToggle or any other similar function working with some delay so need run $(window).trigger(‘resize’); after this delay. Just need run with setTimeout example is$('.openmore').click(function () { $('.lightdiv').slideToggle(200); if ($(this).html() == 'Show more') { $(this).html('Close'); } else { $(this).html('Show more'); } setTimeout(function(){$(window).trigger('resize');},201) });
seems to be fixed with triggering resize. closing.