Quantcast
Channel: User TerranRich - Stack Overflow
Viewing all articles
Browse latest Browse all 41

Inserting multiple elements into another element in PrototypeJS?

$
0
0

In PrototypeJS, is there a more efficient way to insert multiple Element objects into an element? Here is the code I have now:

var calendar_elem = new Element('div', {'id': 'my_calendar'}).insert({    bottom: title_elem   // assume these are all Element objects}).insert({    bottom: days_of_week_elem}).insert({    bottom: month_calendar_elem}).insert({    bottom: footer_elem});

Can the bottom index contain an array, or must it contain only one Element/string of HTML? Would it be more efficient to get the HTML of each element being inserted, concatenate them, and pass that into bottom instead? Thanks!


Viewing all articles
Browse latest Browse all 41

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>