Finding the CSS Class

Sherry Collins asked on May 11, 2015 20:46

I need to show/hide widgets based on the start stop date in the poll widget. Trying to find the class of the poll widget show I can hide in the CSS and then show in a JQuery script.

This is the markup of the

I want to hide.




I have tried using this in the CSS .PollControl { display: none;}

I am not getting it to respond.

Can someone tell me what I'm doing wrong?

Recent Answers

Richard Sustek answered on June 2, 2015 09:55

Hi Sherry,

Thank you for your message.

One way to find out what exact classes are applied to a certain element is to either view the Source code of your HTML page (each browser allows you to view the source -> Most often it can be done by right clicking on the HTML page and then selecting "View source" option or something similar) or by using developers tools of your web browser (again - all major web browser have built in developers tool - search your browser options) which you can use to basically aim at the element and see what classes and styles are applied to it.

The other and presumably better way would be to wrap your widget in a custom div with an unique ID and then whenever you need to hide the contents of your widget, you simply hide the div.

Hope it helps!

Kind regards,

Richard Sustek

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.