- changed status to invalid
JS error when no forum posts to display
When there are no news items, a js error related to the use of the slick jquery slider is shown when looking in the code inspector of a browser.
Comments (3)
-
reporter -
reporter - changed status to open
Re-opened. Issue happens when using workaround below in custom JS to resolve issue when using Adaptable tabs and switching between them cause the slider to momentarily lose its format until next slide.It happens if you immediately switch tabs before next slide appears.
<script type="text/javascript"> $("#coursetabcontainer :radio").on("change", function() { $('.responsive').slick('setPosition'); }); $("#dashboardtabcontainer :radio").on("change", function() { $('.responsive').slick('setPosition'); }); </script>
-
reporter - changed status to invalid
No way around this in the code found at the moment but any custom JS fixes must look like the following. So check that the JS method being called actually exists.
<script type="text/javascript">if (typeof $('.responsive').slick === "function") {$("#coursetabcontainer :radio").on("change", function() {$('.responsive').slick('setPosition');});$("#dashboardtabcontainer :radio").on("change", function() {$('.responsive').slick('setPosition');});}</script>
- Log in to comment
Cannot reproduce this.