Click hide to show,Words overlap | XM Community
Solved

Click hide to show,Words overlap

  • 29 January 2019
  • 1 reply
  • 4 views

Userlevel 2
Badge +3
!
When I click aaaa, these words are overlapped
!
This is the code I added.
!
!
Could you help me please?
icon

Best answer by SaurabhPujare_Ugam 30 January 2019, 05:27

View original

1 reply

Userlevel 6
Badge +18
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