Results 1 to 7 of 7

Thread: Drop down/ Overlapping Content script multi instance

  1. #1
    Join Date
    Apr 2013
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Drop down/ Overlapping Content script multi instance

    1) Script Title: Drop down/ Overlapping Content script

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

    3) Describe problem:
    I am using the script on a page multiple times. the page is located here http://www.roberthirschfield.com/newsite/ hover over the logo and the first instance drops down the navigation.

    My questions are:
    For the dropdown menu instance i want the function in the .js to be set to
    HTML Code:
    hidedivmouseout: [true, 500],
    but for the other menu li triggers drop down instances i want to use the other function
    HTML Code:
    hidedivmouseout: [false],
    so that once they are open they do not auto hide and need to be closed ether by clicking the close button
    HTML Code:
    <a href="javascript:dropdowncontent.hidediv('subcontent')">close</a>
    or it should close when you click the menu item trigger again.

    Also is it possible that when you click a new trigger it would also close the existing one before the new one opens above it? Otherwise it looks messy.

    Finally is there a way to locate the subcontent div so that its not relative to the trigger location?
    Currently my triggers are a menu list so when you activate them they all drop down relative to the trigger location.

    Thanks in advance for any help with this.

  2. #2
    Join Date
    Aug 2004
    Posts
    9,910
    Thanks
    3
    Thanked 969 Times in 957 Posts
    Blog Entries
    15

    Default

    Try the below modified .js file, which adds an extra parameter to the init() function that when set to false causes that instance of the drop down content to only disappear on manual click:

    Code:
    dropdowncontent.init("searchlink", "right-bottom", 500, "mouseover")
    dropdowncontent.init("contentlink", "left-top", 300, "click", false)
    Also is it possible that when you click a new trigger it would also close the existing one before the new one opens above it? Otherwise it looks messy.
    The modified .js file which also do that- close other drop down content boxes when the current one is revealed.
    Attached Files Attached Files
    DD Admin

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    ecomatt (04-10-2013)

  4. #3
    Join Date
    Apr 2013
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks so much for your .js tweaks it works.
    But now i have a problem that all instances of the dropdowncontent vanish when you click on another trigger.

    if you have a look at the website its easier to see than explain.
    http://www.roberthirschfield.com/newsite/

    what im trying to achieve is first instance of the dropdowncontent is a mouseover navigation and it should only vanish if on hourout.
    Then in that dropdowncontent nav there are more trickers for the second type of instance. those are the "about" and "profile" pages which should dropdown but only they should vanish when another tricker is clicked, keeping the menu on screen the whole time.

    the other thing iv been trying to figure out is once you trigger a moueover to get the dropdowncontent if you go over the trigger again while the dropdowncontent is visible it vanishes and immediately generates again.

    is there a way to make it so that if its visible that the trigger will not trigger again.
    the logo which is the trigger is in the dropdowncontent area so technically its not a true mouse out.

    thanks again for any help

  5. #4
    Join Date
    Aug 2004
    Posts
    9,910
    Thanks
    3
    Thanked 969 Times in 957 Posts
    Blog Entries
    15

    Default

    what im trying to achieve is first instance of the dropdowncontent is a mouseover navigation and it should only vanish if on hourout.
    I assume the last word above is "mouseout". Lets focus on this issue first. Try the below modified file, which no longer automatically hides all other drop down contents on the page if the currently active drop down content is triggered via "mouseover", instead of "onclick".
    Attached Files Attached Files
    DD Admin

  6. #5
    Join Date
    Apr 2013
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks again
    Yes sorry for miss spelling.
    I have tried your new .js but the moueover dropdown still vanishes when i click on the other triggers even though i havnt done a mouseout?

    If you compare this page http://www.roberthirschfield.com/newsite/index.php/ which is using the dropdowncontent.js only
    with http://www.roberthirschfield.com/new...x.php/projects which i have achieved what i want but had to use another accordian script for the about and profile popout content.

    but if you see how when you click any of the triggers in the menu which are wrapped int he first instance of dropdowncontent they dont vanish when the about or profile pops out. they only vanish when you mouseout.

    I hope i am explaining myself properly? thats how i want to have it but using only the dropdowncontent script.

    thanks again

  7. #6
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,814
    Thanks
    2
    Thanked 424 Times in 418 Posts

    Default

    I have this DRAFT tested with IE an FF

    http://www.vicsjavascripts.org.uk/AA...Up/130408C.htm
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  8. #7
    Join Date
    Apr 2013
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thats amazing
    what did you change to stop the trigger re loading the menu on mouseover?

    Thank you so much for this i will test it out on my live site now and see how i get on...

Similar Threads

  1. Drop down/ Overlapping Content script
    By flightoffancy in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 07-15-2011, 06:28 AM
  2. Drop down/ Overlapping Content script
    By luxury in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 07-23-2009, 02:15 AM
  3. Drop down/ Overlapping Content script
    By james_byrne in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 07-11-2008, 05:34 AM
  4. Drop down/ Overlapping Content script
    By xelencin in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 02-13-2008, 05:40 AM
  5. Drop down/ Overlapping Content script help me please
    By Dazza30 in forum Dynamic Drive scripts help
    Replies: 5
    Last Post: 01-22-2008, 12:11 PM

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
  •