Is there any way in jquery to access the options length of combobox? I'm trying to change this line
cmbBox.options.length = 0;
with a jquery syntax.
Is there any way in jquery to access the options length of combobox? I'm trying to change this line
cmbBox.options.length = 0;
with a jquery syntax.
Why is there a need to use jQuery
syntax? jQuery
is merely a JavaScript framework that is meant to make development easier, but when something is already easy in JavaScript, why use jQuery
??
Anyway, you can retrieve the length of a jQuery
nodelist you can simply use the length
method:
var len = $('#cmbBox option').length():