This is some sample text
$(document).ready(function () {
var pageEditing = 'false';
if (pageEditing == 'true') {
$('#ctl49_ctl01_ctl00animationSandbox').html('
Animation Widget - use Page Preview to view
');
$('#ctl49_ctl01_ctl00animationSandbox').show();
}
else {
ctl49_ctl01_ctl00setInitialParameters();
}
});
function ctl49_ctl01_ctl00testAnim() {
var anim = $('#ctl49_ctl01_ctl00_hdn_animation').val();
//$('#ctl49_ctl01_ctl00animationSandbox').bind("animationend", function () {
// alert("User clicked on 'foo.'");
//});
$('#ctl49_ctl01_ctl00animationSandbox').removeClass().addClass(anim + ' ts-animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
$(this).removeClass();
});
};
function ctl49_ctl01_ctl00setInitialParameters() {
var imageUrl = $('#ctl49_ctl01_ctl00_hdn_imageUrl').val();
$('#ctl49_ctl01_ctl00animationSandbox img').attr('src', imageUrl);
var text = $('#ctl49_ctl01_ctl00_hdn_text').val();
text = text.replace(/\n/gm, '
');
$('#ctl49_ctl01_ctl00animationText').html(text);
var textSize = $('#ctl49_ctl01_ctl00_hdn_textSize').val();
$('#ctl49_ctl01_ctl00animationSandbox h4').css('font-size', textSize + 'px');
var textColor = $('#ctl49_ctl01_ctl00_hdn_textColor').val();
$('#ctl49_ctl01_ctl00animationText').css('color', textColor);
var picSize = $('#ctl49_ctl01_ctl00_hdn_picSize').val();
if (picSize == 'None') {
$('#ctl49_ctl01_ctl00animationSandbox img').hide();
}
else {
// #310 Bug Fix, animation images not responsive
$('#ctl49_ctl01_ctl00animationSandbox img').css('max-width', picSize + 'px');
$('#ctl49_ctl01_ctl00animationSandbox img').css('height', 'auto');
$('#ctl49_ctl01_ctl00animationSandbox img').css('width', '100%');
}
var loop = $('#ctl49_ctl01_ctl00_hdn_loop').val();
//ctl49_ctl01_ctl00setAttributes('iteration-count', loop);
var duration = $('#ctl49_ctl01_ctl00_hdn_duration').val();
ctl49_ctl01_ctl00setAttributes('duration', '' + duration + 's');
var delay = $('#ctl49_ctl01_ctl00_hdn_delay').val();
//* ctl49_ctl01_ctl00setAttributes('delay', '' + delay + 's'); *//
ctl49_ctl01_ctl00delayedStart(delay)
var border = $('#ctl49_ctl01_ctl00_hdn_border').val();
if (border == '0') {
}
else {
var borderParameter = '' + border + 'px solid ' + textColor;
$('#ctl49_ctl01_ctl00animationSandbox').css('border', borderParameter);
$('#ctl49_ctl01_ctl00animationSandbox').css('padding', '8px');
}
var animation = $('#ctl49_ctl01_ctl00_hdn_animation').val();
var pageSelected = $('#System.Web.UI.WebControls.HiddenField').val();
if (pageSelected == 0) {
}
else {
$('#ctl49_ctl01_ctl00animationSandbox').css('cursor', 'pointer');
$('#ctl49_ctl01_ctl00animationSandbox').click(function () {
$(this).fadeOut(1000);
var link = $('#ctl49_ctl01_ctl00_hdn_link').val();
location.assign(link);
return false;
});
}
var center = $('#ctl49_ctl01_ctl00_hdn_center').val();
if (center == '1') {
var as = $('#ctl49_ctl01_ctl00animationSandbox');
var p = as.detach();
p.appendTo('body');
as.css({
'position': 'fixed',
'left': '50%',
'top': '50%'
});
as.css({
'margin-left': -as.outerWidth() / 2 + 'px',
'margin-top': -as.outerHeight() / 2 + 'px'
});
}
var beforeFirstShowing = $('#ctl49_ctl01_ctl00_hdn_beforeFirstShowing').val();
if (beforeFirstShowing == 'show') {
$('#ctl49_ctl01_ctl00animationSandbox').show();
}
}
function ctl49_ctl01_ctl00delayedStart(wait) {
setTimeout(ctl49_ctl01_ctl00delayedStartDoIt, wait * 1000)
}
function ctl49_ctl01_ctl00delayedStartDoIt() {
// Always show the animation itself
$('#ctl49_ctl01_ctl00animationSandbox').show();
ctl49_ctl01_ctl00testAnim();
// set a timer which will tell us when the animation completes (we hope)
var duration = $('#ctl49_ctl01_ctl00_hdn_duration').val();
setTimeout(ctl49_ctl01_ctl00delayedStartDoItAgain, duration * 1000)
}
function ctl49_ctl01_ctl00delayedStartDoItAgain() {
// an animation just completed
var beforeSequequentShowings = $('#ctl49_ctl01_ctl00_hdn_beforeSubsequentShowings').val();
if (beforeSequequentShowings == "noshow") {
$('#ctl49_ctl01_ctl00animationSandbox').fadeOut(200);
}
var loop = $('#ctl49_ctl01_ctl00_hdn_loop').val();
// if we only do this once -- we are done
if (loop == '1') {
return;
}
var wait = $('#ctl49_ctl01_ctl00_hdn_delay').val();
if (beforeSequequentShowings == 'skip') {
wait = 0; // no wait on subsequent showings
}
else {
if (beforeSequequentShowings == 'show') {
}
else {
$('#ctl49_ctl01_ctl00animationSandbox').fadeOut(200);
}
}
ctl49_ctl01_ctl00delayedStart(wait);
}
function ctl49_ctl01_ctl00centerIt () {
$('#ctl49_ctl01_ctl00animationSandbox').css('position', 'fixed');
$('#ctl49_ctl01_ctl00animationSandbox').css('top', '50%');
$('#ctl49_ctl01_ctl00animationSandbox').css('left', '50%');
$('#ctl49_ctl01_ctl00animationSandbox').center();
}
function ctl49_ctl01_ctl00setAttributes(what, value) {
//#yourElement {
// -vendor-animation-duration: 3s;
//-vendor-animation-delay: 2s;
//-vendor-animation-iteration-count: infinite;
//}
ctl49_ctl01_ctl00setAttribute('moz', what, value);
ctl49_ctl01_ctl00setAttribute('o', what, value);
ctl49_ctl01_ctl00setAttribute('webkit', what, value);
ctl49_ctl01_ctl00setAttribute('ms', what, value);
}
function ctl49_ctl01_ctl00setAttribute(browser, what, value) {
var part1 = '-' + browser + '-animation-' + what;
var part2 = value;
//alert(part1);
//alert(part2);
$('#ctl49_ctl01_ctl00animationSandbox').css(part1, value);
}
var backgroundPage = '2';
var backgroundList = [['1','/uploads/122991/pagetemplates/DesignCreated201811261602/images/bg.jpg'],['2','/uploads/122991/pagetemplates/DesignCreated201811261602/images/bg2.jpg'],['3','/uploads/122991/pagetemplates/DesignCreated201811261602/images/bg3.jpg'],['4','/uploads/122991/pagetemplates/DesignCreated201811261602/images/bg4.jpg'],['5','/uploads/122991/pagetemplates/DesignCreated201811261602/images/bg5.jpg'],['6','/uploads/122991/pagetemplates/DesignCreated201811261602/images/bg6.jpg']];
$(document).ready(function () {
App.init();
for (var i = 0; i < backgroundList.length; i++) {
if (backgroundList[i][0] == backgroundPage) {
$('#ts-background').css('background-image', 'url(' + backgroundList[i][1] + ')');
$('#ts-background').css('background-size', 'cover');
$('#ts-background').css('position', 'fixed');
$('#ts-background').css('height', '100%');
$('#ts-background').css('width', '100%');
$('#ts-background').css('z-index', '-100');
}
}
});