Search code examples
javascriptjqueryqualtrics

How to push back button on top of the page


I am using a survey tool called Qualtrics and I was wondering if we can push the back button on the top left instead of bottom left, while the next button remains at the bottom

I found a code that clones the buttons. But I would only like to push the actual back button on top using JS

<script type="text/javascript">
Qualtrics.SurveyEngine.addOnReady(function() { jQuery('#HeaderContainer').after(jQuery('#Buttons').clone(1)); $('Header').insert($('Buttons')); });
</script>

Some help would be highly appreciated.


Solution

  • Move the back button to just after the header:

    <script type="text/javascript">
    Qualtrics.SurveyEngine.addOnReady(function() { 
      jQuery('#HeaderContainer').after(jQuery('#PreviousButton'));
    });
    </script>
    

    However, by moving it outside the buttons div (#Buttons), you may lose css styling. Therefore, you may need to add some css to style the back button to match the next button.