Results 1 to 4 of 4

Thread: Open delay for stayontop.js script

  1. #1
    Join Date
    Jun 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Open delay for stayontop.js script

    1) Script Title: stayontop.js

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici.../stayontop.htm

    3) Describe problem: I'd like to delay open of layer, maybe possibile to indicate into the parameters a value where I can specify time form the load of the page and the show of the layer ?

    Thanks in advance to all for support.
    Marco.

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

    Default

    Sure, try the below modified .js file, which adds a "showafter" option, in milliseconds. Then in your initialization code, you can specify a delay before the content is shown on the page:

    Code:
    alwaysOnTop.init({
    	targetid: 'examplediv',
    	orientation: 3,
    	position: [5, 10],
    	fadeduration: [1000, 1000],
    	frequency: 0.95,
    	hideafter: 15000,
    	showafter: 5000
    })
    Make sure inside the markup for the content in question that it's initially hidden, by setting its display property to "none":

    Code:
    <div id="examplediv" style="width:140px; border:1px solid gray; padding: 10px; background: lightyellow;display:none">
    
    This DIV is static and shown 95% of the time the page loads. It's positioned relative to the lower left corner of the window. It disappears after 15 seconds.
    
    </div>
    DD Admin

  3. #3
    Join Date
    Jun 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks very much, this is exactly what I wanted :-)
    Ciao,
    Marco.

  4. #4
    Join Date
    Mar 2015
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hello there
    where can i find the modified .js file ?

    the attachment link
    http://www.dynamicdrive.com/forums/m...hments&t=62975
    returns
    vBulletin Message
    There are no attachments to display

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
  •