Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML String to Element mootools

I'm looking for a way to create elements form string eg this doesnt work:

$('some').adopt('<span>test</span>');

you must use new Element but i have a huge html string. I could do this:

new Element('div', {html: hugeHtmlString});

but its so wrong. why can't it be as simple as it is in jquery

like image 324
antpaw Avatar asked Jul 17 '11 13:07

antpaw


1 Answers

http://mootools.net/docs/more/Element/Elements.From

does the job

like image 139
antpaw Avatar answered Sep 28 '22 06:09

antpaw