I current have a page that uses inline links, which I would like to
use smoothscroll on. The problem is my links are with a select box:
<select onChange="javascript:changeLocation(this)">
<option>Location</option>
<option value="#atlanta">Atlanta</option>
<option value="#boston">Boston</option>
<option value="#charlotte">Charlotte</option>
<option value="#chicago">Chicago</option>
<option value="#columbus">Columbus</option>
<option value="#dallas">Dallas</option>
<option value="#farmington">Farmington (headquarters)</option>
<option value="#kansas-city">Kansas City</option>
<option value="#new-york">New York</option>
<option value="#philadelphia">Philadelphia</option>
<option value="#san-fran">San Francisco</option>
<option value="#st-paul">St. Paul</option>
<option value="#toronto">Toronto</option>
</select>
Here's the JS script for "changeLocation":
<script type="text/javascript">
function changeLocation(menuObj) {
var i = menuObj.selectedIndex;
if (i > 0) {
window.location = menuObj.options[i].value;
}
}
</script>
Is there a way to get the smoothscroll to work with the select from
the drop down box? I've searched all over the place and can't seem to
find an answer.
Any help would be most appreciated.