jquery plugin that expands a element to the width of the viewport, no matter where it is located in the dom.
JavaScript HTML CSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea
images
js
stylesheets
README.md
index.html

README.md

#elementXpander

A simple jquery plugin, that expands a element to the width of the viewport, no matter where it is located in the dom.

##Usage##

$('.yourelement').elementXpander();

You Probably need to set at least the Class Name of the page wrapper the default value is .page.

$('.yourelement').elementXpander({
pagecontainer   : '.yourwrapper'
});

##Configuration##

pagecontainer   : '.page',
position        : 'relative', // The css position of yourelement. Sometimes 'absolute' works better than relative.
wrap            : 'null', // Option value 'yes' you get a wrap around yourelement, which is sometimes necessary for proper work.
width           : 100, // eg 80 sets the width of the container to 80% of the viewport.
height          : null, // eg 80 sets the height of the container to 80% of the viewport.
offsetx         : 0, // you can enter -20px or -10% to have a offset to the left.
complete        : null  // a callback everytime the width of the element is recalculated e.g. After browser resizing e.g complete    : function() { alert( 'callback!' ) }