I'm using uniform.js for jQuery and I need to change the values of the select item programmatically. It seems to change the actual <select> field, but the uniform element doesn't change. What is the proper way to do this, other than manually looking up the HTML for the option, then setting the uniform element to that value?
After setting the value as usual, you need to tell uniform to update the element.
$.uniform.update("#myUpdatedSelect");
or as the documentation says, if you are lazy you can let it update ALL elements
$.uniform.update();
Try to use the update command in the complete function:
$('.selectbox').load('index.php?get=newoptions', function() {
$.uniform.update('selectbox');
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With