Jaylen
Jaylen

Reputation: 40301

How to hide jQuery UI MultiSelect Widget by default and how it when needed?

I am using jQuery UI MultiSelect Widget for one my my pick lists. Then problem is that I am having is when I use "display: none;" in the select This menu does not hide by default and it is always being displayed. I have a header file where I have this menu on all the pages but I want to hide it by default and show it when every I need it.

The problem is the "display: none;" is not hiding it. How can I get the MultiSelect Widget to not ignore the display: none?

thanks for your help

Upvotes: 1

Views: 2029

Answers (1)

Vickel
Vickel

Reputation: 7997

<select style="display:none;"> will not work. You have 2 options

assign a class to <select> and apply css-style to that class with display:none

or

wrap <select></select> with a <div></div> and apply the css-style display:none to that div

Upvotes: 2

Related Questions