jquery - <select> option change - URL redirect -


i using neat plugin customising <select> lists.

http://exodecreations.com/jquery/jqdropdown.html

i trying come code when user selects each option, redirected page. code follows:

<form action="#"> <select id="elidp" > <option value='' disabled selected>choose location...</option> <option value='http://www.google.com/'>new york</option> <option value='http://www.google.com/'>la</option> </select> </form> 

jquery:

jquery(function() {        jquery('#elidp').jqdropdown({       optionchanged: function(){ jquery('#elidp').on('change', function () {var url = $(this).val(); if (url) {window.location = url;}return false;});},          direction: 'up',         defaultstyle: false,         containername: 'thecontainer',         togglebtnname: 'awesometoggleclass',         optionlistname: 'thislistisrocking',         effect: 'fade',         effectspeed: 300     });  });  

however, nothing happens when user changes options... ideas?

because don't change. value of 2 options provided same (google.com)


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -