How can I remove the spaces when hiding the question using Javascript | XM Community
Skip to main content
Question

How can I remove the spaces when hiding the question using Javascript

  • March 22, 2022
  • 1 reply
  • 45 views

Forum|alt.badge.img+6

I am using the Javascript below to hide a question based on Embedded data. The problem is that there are white spaces. How can I remove that?
if("${e://Field/PrimaryCountry}"=="Argentina"){
jQuery("#"+this.questionId").css("visibility","collapse")
}
image.png
rochediacx.fra1.qualtrics.com/jfe/preview/SV_0rmXSQURf0tylw2?Q_CHL=preview&Q_SurveyVersionID=current&PrimaryCountry=Argentina

1 reply

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • March 22, 2022

Use the following instead of visibility collapse:
jQuery("#"+this.questionId").hide();