Select box manipulation with jQuery - update and new plugin
In my plugins for working with select boxes, ajaxAddOption can now call a function after the options have been added. There is also a new plugin (containsOption) for checking if an option with a given value exists.
Comments
I've tried function(){this.sortOptions()} as well as function(){arguments[0].sortOptions()}, but neither work. In fact, I don't see any arguments being passed in to the specified function.
var s = $(this).parent().next().find("select");
s.removeOption(/./);
s.ajaxAddOption("/project/contacts", {'id': this.value, 'type': 'onsite', 'info': 'full_name_with_address'}, false, function(){arguments[0].sortOptions()}, [s]);