PDA

View Full Version : question about Stay On Top Content script



evan5
05-27-2009, 09:31 PM
1)Stay on top content script

2) http://www.dynamicdrive.com/dynamicindex17/stayontop.htm

3) Do you guys know if it is possible to manipulate when th message will appear on the page? let say i want the stay on top content to fade in, but after 10 seconds of the page being opened; how would i be able to do that:confused:.

ddadmin
05-28-2009, 05:38 AM
Are you looking to just universally do this for all instances of Stay on Top Contents launched on the page? If so, inside the .js file, just wrap these two lines with the parts in red:


if (settings.externalsource!='' && settings.display){ //if ajax content
setTimeout(function(){alwaysOnTop.loadajaxcontent($, settings)}, 1000)
}
else if (settings.externalsource==''){ //inline content
var $target=$('#'+settings.targetid)
if (!settings.display){ //if hide content (based on frequency setting)
$target.hide()
return false
}
else{
setTimeout(function(){alwaysOnTop.positiontarget($target, settings), 1000)
}
}

Where 1000 denotes 1 second.

evan5
06-03-2009, 08:25 PM
thankyou for that help, the thing is I have to different instances (two words)..where i want one to appear a couple seconds prior to the second word. They are on different sides of the page. Is there something i can add to this part of the script? to make them appear at diff times. right now im just extending the fade in value lol

<script type="text/javascript">
alwaysOnTop.init({
targetid: 'examplediv',
orientation: 3,
position: [5, 10],
fadeduration: [15000, 1000],
hideafter: 0
})
alwaysOnTop.init({
targetid: 'example',
orientation: 4,
position: [5, 10],
fadeduration: [30000, 1000],
hideafter: 0
})
</script>

The word with the 30000 is the one i want to appear couple seconds later, that why i have it fading in longer....thats kinda ghetto though :rolleyes: