Results 1 to 4 of 4

Thread: drop-in box

  1. #1
    Join Date
    Apr 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default drop-in box

    1) Script Title: drop-in content box

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

    3) Describe problem: drop-in from right to left

    Please how can i modify the drop-in script to be able to move from right to left.
    Thank you

  2. #2
    Join Date
    Apr 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Please any help?

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

    Default

    Ok, try replacing the 3 functions "initbox()", "dropin()" and "bouncein()" with the below modified instead:

    Code:
    function initbox(){
    if (!dom&&!ie&&!ns4)
    return
    crossobj=(dom)?document.getElementById("dropin").style : ie? document.all.dropin : document.dropin
    scroll_left=(ie)? truebody().scrollLeft : window.pageXOffset
    crossobj.left=scroll_left-parseInt(crossobj.width)+calunits
    crossobj.visibility=(dom||ie)? "visible" : "show"
    dropstart=setInterval("dropin()",50)
    }
    
    function dropin(){
    scroll_left=(ie)? truebody().scrollLeft : window.pageXOffset
    if (parseInt(crossobj.left)<200+scroll_left)
    crossobj.left=parseInt(crossobj.left)+40+calunits
    else{
    clearInterval(dropstart)
    bouncestart=setInterval("bouncein()",50)
    }
    }
    
    function bouncein(){
    crossobj.left=parseInt(crossobj.left)-bouncelimit+calunits
    if (bouncelimit<0)
    bouncelimit+=8
    bouncelimit=bouncelimit*-1
    if (bouncelimit==0){
    clearInterval(bouncestart)
    }
    }
    That should do it.

  4. #4
    Join Date
    Apr 2007
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hey thanks alot for the solutions

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
  •