Results 1 to 3 of 3

Thread: question about Stay On Top Content script

  1. #1
    Join Date
    Oct 2008
    Posts
    48
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default question about Stay On Top Content script

    1)Stay on top content script

    2) http://www.dynamicdrive.com/dynamici.../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.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,140
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    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:

    Code:
    			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.
    DD Admin

  3. #3
    Join Date
    Oct 2008
    Posts
    48
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •