jQuery: Add Button to div#Buttons | Experience Community
Skip to main content
Solved

jQuery: Add Button to div#Buttons

  • Sep 28, 2018 3:19 PM UTC
  • 1 reply
  • 1068 views

Forum|alt.badge.img+3
Is there a simple way to add a custom button to the #Buttons div? I'm sure I saw a post with jQuery or Qualtrics Javascript API instructions, but now I can't find it.

Best answer by red5

Found the article. This code adds a test button. The value attribute is what displays as the button's text. Qualtrics.SurveyEngine.addOnload(function() { jQuery('#Buttons').append('<input id="TestButton" class="NextButton Button" title="Test Button" type="button" name="TestButton" value="TestButton" data-runtime-disabled="runtime.Disabled" data-runtime-aria-label="runtime.ariaLabel" data-runtime-hide="runtime.Hide" aria-label="Test Button">'); }); Here is the original article with a different example of using jQuery to append and clone: https://www.qualtrics.com/community/discussion/1431/floating-submit-button Note: you might need to add css to make the appended button look like the others.
View original

1 reply

Forum|alt.badge.img+3
  • Author
  • Level 1 ●
  • Answer
  • Sep 28, 2018 4:20 PM UTC
Found the article. This code adds a test button. The value attribute is what displays as the button's text. Qualtrics.SurveyEngine.addOnload(function() { jQuery('#Buttons').append('<input id="TestButton" class="NextButton Button" title="Test Button" type="button" name="TestButton" value="TestButton" data-runtime-disabled="runtime.Disabled" data-runtime-aria-label="runtime.ariaLabel" data-runtime-hide="runtime.Hide" aria-label="Test Button">'); }); Here is the original article with a different example of using jQuery to append and clone: https://www.qualtrics.com/community/discussion/1431/floating-submit-button Note: you might need to add css to make the appended button look like the others.