Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Google Closure - positions sections horizontally with position:absolute
app.plateSections = function() {
var plateWidth = 0;
// Add the first section's width. goog.dom.getFirstElementChild( goog.dom.getElement('plate') ) ).width ;
// Position each of the sections horizontally one after another starting from the first child of plate.
goog.array.forEach( goog.dom.getChildren( goog.dom.getElement('plate') ), function(section) { goog.dom.getNextElementSibling(section), + );
// Accumulate the width of each section after the first section.
plateWidth +=;
// Get the should-be width of the plate element.'plate'), plateWidth);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment