Hello
@anm54267 ,
You can place your code in "look and feel"-> "Advanced"("General")->"header(edit)"->"source(<>)", by doing so the script will run at each page
>
@Shashi said:
> Hello
@anm54267 ,
>
> You can place your code in "look and feel"-> "Advanced"("General")->"header(edit)"->"source(<>)", by doing so the script will run at each page
In addition to this you will need to check that the question on page is multiple choice.
@AnthonyR Can you elaborate on this?
>
@AnthonyR said:
> >
@Shashi said:
> > Hello
@anm54267 ,
> >
> > You can place your code in "look and feel"-> "Advanced"("General")->"header(edit)"->"source(<>)", by doing so the script will run at each page
>
> In addition to this you will need to check that the question on page is multiple choice.
@anm54267 -
@AnthonyR means that since your script will run on every page, it should only apply on pages that have one and only one multiple choice question. It should also probably only apply if the MC question has two choices. So you should put your code inside if statements:
```
if(jQuery('.QuestionOuter.MC').length == 1) //one question is MC
if(jQuery('.QuestionOuter.MC li.Selection').length == 2) { //two MC choices (vertical)
...your code goes here...
}
}
```