Apply jump menu functionality on select box styled with jquery
- by ktsixit
Hi all,
I am using this script to apply style on a select box. It works fine as a standalone version.
But I also need to apply a jump menu functionality on this select box. I tried adding a function but it seems that there is some conflict between the two scripts. The jquery styling and the jump menu function can't work together at the same time.
Can you help me fix it? This is a sample code to let you know what I'm dealing with here:
<script type="text/javascript">
$(document).ready(function() {
$('#jumpMenu').selectbox({debug: true});
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
});
</script>
<select name="jumpMenu" id="jumpMenu" onchange="MM_jumpMenu('parent',this,0)">
<option value="http://www.link1.com">link1</option>
<option value="http://www.link2.com">link2</option>
<option value="http://www.link3.com">link3</option>
</select>