return this.jsAttr("selected", true)
}
jQuery.fn.unselectOption = function() {
return this.jsAttr("selected", false)
}
jQuery.fn.toggleOption = function() {
return this.each(function() { this.selected = !this.selected; })
}
jQuery.fn.moveToSelect = function(el) {
jQuery(el).append(this);
}
jQuery.fn.jsAttr = function(attr, value) {
return this.each(function() { this[attr] = value })
}
The above are a few utility functions I wrote so I could write a dual-pane select box implementation that moved from one box to another.
So you could do $("#first option:selected").moveToSelect("#second")
--
Yehuda Katz
Web Developer | Wycats Designs
(ph) 718.877.1325
_______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
