How to remove code from JUST one question? | XM Community
Solved

How to remove code from JUST one question?

  • 1 April 2024
  • 4 replies
  • 25 views

Userlevel 3
Badge +7

Hi All, 

I have this code programmed on the THEME of my survey:

.Skin .Matrix table thead th:last-of-type {
 border-left: 2px solid #8D8D8D4D;

.Skin .Matrix table .ChoiceRow td:last-of-type { 
 border-left: 2px solid #8D8D8D4D; 

.Skin .Matrix table .ChoiceRow td:last-of-type label { 
 margin-left:0px; 

.JFEScope .Skin .Matrix .q-matrix.mobile table td:last-of-type { 
 border-top: 2px solid #8D8D8D4D; 
 border-left: 0px;
}
.JFEScope .Skin .Matrix .q-matrix.mobile table td:last-of-type label { 
 margin-top:0px; 
}

 

HOWEVER, I don’t want to apply it to a (single) question. Is there a way to overwrite this in the javacode for a single question? - I would like it still applied to the theme, just removed/ignored for a single question.

icon

Best answer by MaggieGentry 2 April 2024, 23:58

View original

4 replies

Userlevel 7
Badge +21

You'll need to decide what you want it to be.

Taking the last one as an example, suppose you want the margin-top to be 10px for that particular question, you could add the js:

document.querySelectorAll(".JFEScope .Skin .Matrix .q-matrix.mobile table td:last-of-type label").style.marginTop= "10px";

 

And so on. 

Userlevel 3
Badge +7

@ahmedA  - I want to make the line white and/or not display the line that I programmed on the theme level

Userlevel 7
Badge +21

What is its selector?

Userlevel 3
Badge +7

I figured out a work around. Only program code on this one question, but turn the line white:

<style type="text/css">
.Skin .Matrix table thead th:last-of-type {
 border-left: 2px solid #FFFFFF;

.Skin .Matrix table .ChoiceRow td:last-of-type { 
 border-left: 2px solid #FFFFFF; 

.Skin .Matrix table .ChoiceRow td:last-of-type label { 
 margin-left:0px; 

.JFEScope .Skin .Matrix .q-matrix.mobile table td:last-of-type { 
 border-top: 2px solid #FFFFFF; 
 border-left: 0px;
}
.JFEScope .Skin .Matrix .q-matrix.mobile table td:last-of-type label { 
 margin-top:0px; 
}
</style>

Leave a Reply