Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot hide a selector, jQuery Uniform plugin

I'm using Uniform on select controls. I want to hide some of them so I do:

$('.selector').hide();
$.uniform.update('.selector');

The $.uniform.update('.selector') is to sync the changes to uniform. But it's not working, the control just stays visible and no selectable.

Has anyone dealt with this before?

like image 390
Felix Avatar asked Apr 24 '26 12:04

Felix


2 Answers

I've solved it wrapping the selector into a <div> and hidding the <div>, but I would like to know if anyone has a better solution.

like image 96
Felix Avatar answered Apr 26 '26 03:04

Felix


$.uniform.update('selector');

is wrong, currently you are trying to find an element named selector, you want to look for the ID instead:

$.uniform.update('#selector');

if you got an element that has and ID of selector that is.

do you need to show the select box before? I tired

$('select').hide().uniform();

and to show it:

$('select').show().parent().show();

It may not be what you are looking for tho.

like image 40
voigtan Avatar answered Apr 26 '26 03:04

voigtan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!