Hide select2

6,433 views
Skip to first unread message

Anshuman

unread,
Dec 13, 2012, 8:12:32 AM12/13/12
to sel...@googlegroups.com
Hi,
If I want to hide one select box then what should I do?

Thanks!

Igor Vaynberg

unread,
Dec 13, 2012, 12:00:16 PM12/13/12
to sel...@googlegroups.com
easiest way is to put select2 into some div you know about and then
hide the div.

-igor
> --
> You received this message because you are subscribed to the Google Groups "select2" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/select2/-/k52PbzL9m_AJ.
> To post to this group, send email to sel...@googlegroups.com.
> To unsubscribe from this group, send email to select2+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/select2?hl=en.
>

onural...@gmail.com

unread,
Oct 1, 2013, 3:08:41 AM10/1/13
to sel...@googlegroups.com, anshuma...@gmail.com
Try this,

$(element).select2("container").hide();

Working for me.

Message has been deleted

pmar...@gmail.com

unread,
Jan 4, 2017, 10:38:24 PM1/4/17
to select2, anshuma...@gmail.com
Easiest way is to hide the parent:

$('#mySelect2Id').parent().hide();

Reply all
Reply to author
Forward
0 new messages