When you try to call the selectOption inside the change method ,it result in
Uncaught RangeError: Maximum call stack size exceeded
I need to reset the value of the select box to default once the user select a option. So i try to set the selectOption(0) on the change event . Here is the code
$(function ($) {
var el = $('select#test');
el.selectBoxIt();
el.on('change', function (e) {
var selectBox = el.data("selectBox-selectBoxIt");
selectBox.selectOption(0);
})
});
</script>
When you try to call the selectOption inside the change method ,it result in Uncaught RangeError: Maximum call stack size exceeded
I need to reset the value of the select box to default once the user select a option. So i try to set the selectOption(0) on the change event . Here is the code
But results in error
Could you possible suggest any solution.