Hi,
I'd like to hide the header on the landing page of the survey (QID2) using the custom CSS. I've drafted the code below but it doesn't work. Any suggestions? Thanks!
Qualtrics.SurveyEngine.addOnload(function () {
if(jQuery('#QID2').length > 0)
{
jQuery("#Header").hide();
}
});
Page 1 / 1
That's JavaScript, not CSS. You should just add the JavaScript to the first question (QID2) as:
```
Qualtrics.SurveyEngine.addOnload(function () {
jQuery("#Header").hide();
});
```
```
Qualtrics.SurveyEngine.addOnload(function () {
jQuery("#Header").hide();
});
```
@TomG Perfect! Thanks!
> @TomG said:
> That's JavaScript, not CSS. You should just add the JavaScript to the first question (QID2) as:
> ```
> Qualtrics.SurveyEngine.addOnload(function () {
> jQuery("#Header").hide();
> });
> ```
Is this known to have any issues with the Table of Content element? This seems to work when I view the block alone, but when I preview the whoel survey and get to this question, it does not. The survey is pretty vanilla except that it uses a Table of Contents element, which is what I am guessing is causing the problem. Has anyone else experienced this?
> That's JavaScript, not CSS. You should just add the JavaScript to the first question (QID2) as:
> ```
> Qualtrics.SurveyEngine.addOnload(function () {
> jQuery("#Header").hide();
> });
> ```
Is this known to have any issues with the Table of Content element? This seems to work when I view the block alone, but when I preview the whoel survey and get to this question, it does not. The survey is pretty vanilla except that it uses a Table of Contents element, which is what I am guessing is causing the problem. Has anyone else experienced this?
Try switching addOnload to addOnReady.
Putting in OnReady fixed the problem. Thanks @TomG
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.