Results 1 to 2 of 2

Thread: Smooth scroll and new location drop down menu

  1. #1
    Join Date
    Nov 2012
    Thanked 0 Times in 0 Posts

    Default Smooth scroll and new location drop down menu

    Have a drop down menu with two options: go to link within the page, want to use smooth scroll or go to a different page. Cannot get the two options to work together. If smooth scroll working, opening new link does not work, and vs.
    HTML Code:
    <select name="dropdown" size="1" id="dropdown" onChange="scrollTo(this.value); top.location.href = this.form.dropdown.options[this.form.dropdown.selectedIndex].value;
    return false;">
    <option value="" selected="selected">Menu</option>
    			<option value="#services">Services</option>
    			<option value="#portfolio">Portfolio</option> 
                             <option value="">JavaScript Samples</option>
    Any suggestion how to get the two types of link to work and keeping the smooth scroll for anchors
    Thank you

  2. #2
    Join Date
    Jul 2008
    Thanked 17 Times in 16 Posts


    onChange="if( !/^http/.test( this.value ) ){ scrollTo(this.value); } else{ top.location.href = this.value }

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

    helix (11-01-2012)

Similar Threads

  1. smooth navigational menu, can it drop up instead of down?
    By lankeeyankee in forum Dynamic Drive scripts help
    Replies: 6
    Last Post: 10-01-2013, 02:39 PM
  2. Setting location where menu items open AnyLink JS Drop Down Menu v2.3
    By xboxdynasty in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 12-09-2011, 04:36 PM
  3. Smooth onmouseover drop down menu
    By MINTCHICKENLEGS in forum Looking for such a script or service
    Replies: 0
    Last Post: 06-04-2010, 11:59 PM
  4. Replies: 0
    Last Post: 02-17-2009, 08:08 PM
  5. Replies: 0
    Last Post: 10-21-2005, 03:12 PM


Posting Permissions

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