Plugins

The plugins site is currently in development.

We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.

Stretched Background Image 0.9.5


Add a background image that stretches with the element.
The CSS background of the element must be transparent in order to work
After the background is applied, an extra function is found in the target element called refreshBackgroundImage that will restretch the image in case you need to manually move the target element around or change size attributes. It is better to use $('#id').trigger('refresh'), though.
It automatically restretches on resize.
Load jGenerateRefresh and set autoRefresh to the length of the interval in milliseconds for autorefresh check.
Example:

$(function() {
$('#target').stretchBackgroundImage({
imageSrc:'test.png', // background image
marginLeft:1, // left margin of the background image
marginTop:1, // top margin of the background image
marginRight:1, // right margin of the background image
marginBottom:1, // bottom margin of the background image
imageIndex:null, // z-Index for the image. Leave it null for automatic.
elementIndex:null, // z-Index for the target element. Leave it null for automatic.
autoRefresh:300, // auto check every 300 milliseconds if size or position changed.
// WARNING! needs jGenerateRefresh loaded
});