not able to add css class to survey question
See original GitHub issueI am trying to highlight the question if there is a particular condition is met. So, I have set the following css class for the question when the condition is met: survey.getQuestionByName(“questionName”).cssClasses.mainRoot = " bq-info";
But, the question does not get highlighted when the condition is met! Am I doing it a wrong way? Note that the css class “bq-info” is legit.
Are you requesting a feature, reporting a bug or asking a question?
asking a question
What is the current behavior?
The question does not get highlighted when the condition is met! Am I doing it a wrong way? Note that the css class “bq-info” is legit.
What is the expected behavior?
The question’s css class should be set to whatever class is provided by the user.
How would you reproduce the current behavior (if this is a bug)?
Provide the test code and the tested page URL (if applicable)
Tested page URL:
Test code
your_code_here
Specify your
- browser: chrome
- browser version: 84+
- surveyjs platform (angular or react or jquery or knockout or vue): jquery
- surveyjs version: 1.8.6
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Add additional css-classes for easier styling - surveyjs Support
Hello. We would like to use or custom styles for tags in question of type "html", but the problem is that we can't...
Read more >Assign custom class to question elements? — XM Community
As far as I can tell, there is no way to add a custom class to question elements - is that right? It's...
Read more >Css Сlasses, Angular Survey Library Example - SurveyJS
Css Сlasses · 1. Radiogroup question (green). Clear · 2. Checkbox question (orange) · 3. Required question (red title) *. Clear.
Read more >Add CSS class to question - LimeSurvey forums
Hi, I would like to change the CSS of some questions uniformely without the hassle of copy-pasting a lot. Is it possible to...
Read more >Lesson 1: Understanding ID and Class in CSS
You want to be able to link to a particular element within a web page. In fact, you already added id="main" to one...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@till-tomorrow Sorry, did not get the question at first. Here is the working example.
Thank you, Andrew
I am afraid, this does not seem to work. Am I doing something wrongly?