Solved
Insert a button that gives a pop-up additional information window when clicked
Hello,
I've been looking for information on how to create a pop-up button that when clicked brings up a box of additional information - but I have only found "hover-over" options and an option for using the "next" button as a pop up option. I'd like to have a button that says "Click here for examples you can use to edit or complete your list" that appears under a text entry form. When clicked, a pop-up window would appear with information.
I am new to Qualtrics with little knowledge on coding. Is there a simple way to do this without coding knowledge? If there is another page with information on this already I'm happy to be redirected. Thank you!
Best answer by NiC
Hi @CSonn
Can you confirm if this is what you're looking for ?
click here
For this you need to add the following code in header:
<link href="//code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css" rel="stylesheet" /> <script src="//code.jquery.com/jquery-1.12.4.js"></script><script src="//code.jquery.com/ui/1.12.1/jquery-ui.js"></script><script>
jQuery("[id*='dialog']" ).dialog({ autoOpen: false});
jQuery('body').on('click','.ui-widget-overlay',function(){ jQuery("[id*='dialog']").dialog('close'); });
</script>
In the question / option you want go in HTML view and add the following code :
``<button id="btn1">Click Me!</button><span id="dialog" title="Qualtrics Community Service">Is this what you want CSonn ?</span> ``
and in add javascript code for that question and put the following code inside after addOnReady(function()
{
/*Place your JavaScript here to run when the page is fully displayed*/
jQuery( "#btn1" ).click(function() {
jQuery("#dialog").dialog( "option", "modal", true );
jQuery("#dialog").dialog( "open" );
});
View originalLeave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.