Prevent appearance of NextButton to alter page dimensions | XM Community
Skip to main content
Hi everyone,



I have a simple slider question on a page(link). When the page loads I hide the next button using JS in the Qualtrics.SurveyEngine.addOnload(function()).



My issue is that when all sliders are in the right position the page resizes. Is there any way, I can keep the page height/width the same so that the next button does not create this issue of resizing the page. When the Next button pops up, which sometimes changed the viewport width and throws off the slider.



Thank you!
I guess your code is using `display:none` to hide the next button. So instead of this try using -

`visibility: collapse;` to hide and `visibility: initial; `to show
@rondev You are right. I am using the following code in the javascript `this.hideNextButton();` Any suggestion on how to write the `visibility: collapse;` in JS? many thanks.
In the code where ever there is `this.hideNextButton();` replace with below code

`jQuery("#NextButton").css("visibility", "collapse");`



In the code where ever there is `this.showNextButton () ;` replace with below code

`jQuery("#NextButton").css("visibility", "initial");`
@rondev it worked like a charm! thank you!

Leave a Reply