Click hide to show,Words overlap | XM Community
Skip to main content
!
When I click aaaa, these words are overlapped
!
This is the code I added.
!
!
Could you help me please?
Hi @Cathaya ,

I assume you are trying to replace/toggle the text "aaaa" with "which of the following" on click.

Your code was correct, i just twiked it a bit.

JS :

Qualtrics.SurveyEngine.addOnReady(function()
{
/*Place your JavaScript here to run when the page is fully displayed*/
jQuery("#a1").click(function(){
jQuery("#text1").toggle();
jQuery("#b1").toggle();
});

});

HTML:

`<div id="a1"><span id="text1">aaaa</span><span id="b1" style="display:none">which of the following describes you? select only one</span></div>`


Just to add if you do not want to replace the text "aaaa", remove the `<span id="text1">`


Hope this helps... 😀

Leave a Reply