[bgstretcher] javascript while loading template
Posted: Wed Jun 29, 2011 7:08 am
I want to use the jquery script "bgstretcher". What that does is stretch a background image you supply to whatever size your window is.
I have it working correctly but I would like someone to be able to choose it within CMSMS.
The way you set it is by adding the path to an image within the javascript.
The script is placed in the "Page Specific Metadata" field of my page.
Is there anyway to include a variable in there or maybe load this with the gallery and pass a variable so you are able to choose an image?
I could make a gallery with only one image that is active, so that solves the choosing, but how can I pass that in the javascript that is loaded with my page?
Any ideas?
I have it working correctly but I would like someone to be able to choose it within CMSMS.
The way you set it is by adding the path to an image within the javascript.
Code: Select all
$(document).ready(function(){
// Initialize Backgound Stretcher
$(document).bgStretcher({
images: ['uploads/site/images/image.jpg'],
imageWidth: 800, imageHeight: 600
});
Is there anyway to include a variable in there or maybe load this with the gallery and pass a variable so you are able to choose an image?
I could make a gallery with only one image that is active, so that solves the choosing, but how can I pass that in the javascript that is loaded with my page?
Any ideas?