Closed GoogleCodeExporter closed 9 years ago
Original comment by diosla...@gmail.com
on 18 Jul 2012 at 5:44
So here's a first attempt, which seems to be working. Now to add a custom class
name to the optgroup heading.
//check if optgroup exists
if ($('optgroup', elm).length != 0){
console.log('optgroup exists');
$('optgroup', elm).each(function() {
var v = $(this).attr('value');
main['_' + v] = $(this).attr('label');
$('option', this).each(function() {
var x = $(this).attr('value');
main['_' + x] = $(this).text();
if ($(this).prop('disabled')) invalid.push(x);
});
if ($(this).prop('disabled')) invalid.push(v);
});
}else {
console.log('optgroup does notexists');
$('option', elm).each(function() {
var v = $(this).attr('value');
main['_' + v] = $(this).text();
if ($(this).prop('disabled')) invalid.push(v);
});
Original comment by vall...@gmail.com
on 18 Jul 2012 at 4:49
2.1-beta (select preset) has optgroup support, check
http://docs.mobiscroll.com/21/select-preset for details
Original comment by diosla...@gmail.com
on 26 Oct 2012 at 12:05
Original issue reported on code.google.com by
vall...@gmail.com
on 17 Jul 2012 at 11:10