I am writing a plugin for a select box. I need to get the size of the options before performing an action. How can i do this?
Sample code:
jQuery.fn.doSomething = function(options){
return this.each(function(){
var optionsSize = this.find("options").size();
});
};
I am getting an error:
this.find is not a function
var optionsSize = this.find("options").size();