1

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.

2 Answers2

1

You can use the jQuery prepend() method:

The jQuery prepend() method inserts content AT THE BEGINNING of the selected HTML elements.

// otherElement will be added as the first child to someElement
$('someElement').prepend(otherElement);  
Ivan86
  • 5,695
  • 2
  • 14
  • 30
1

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.

T. Gibbons
  • 4,919
  • 2
  • 15
  • 32