Answer the question
In order to leave comments, you need to log in
Mootools select(option) not working setting attribute selected='true'
var select = new Element('select');
select.grab(new Element('option', {value: 'usd', selected: 'yes', text: 'usd',}));
select.grab(new Element('option', {value: 'usd',text: 'eur'}));
$('someContainer').grab(select);
This is the code and the selected attribute is not set. It is not set even via setPrperty by id.
Although any other attributes are set just fine. Extremely strange behaviour.
Answer the question
In order to leave comments, you need to log in
I go to the site mootools.net , enter the code into the console:
var select = new Element('select');
select.grab(new Element('option', {value: 'usd', text: 'usd',}));
select.grab(new Element('option', {value: 'usd', selected: 'yes', text: 'eur'}));
$('header').grab(select);
jsfiddle.net/romanco/xpHRq/4/
yes, the select is processed, but I need the selected="true" attribute to be set, any other one is inserted, but this one is not...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question