drop down menu - jquery and selecbox, disallowing -


$('#my_select').live("click", function(e) {     e.preventdefault(); //return false fails.     alert("test"); //or show dialog }); 

having such live action, want disable how dropdown options appear once click selectbox, instead want display own div changes value. code above doesn't disallow , don't want used disabled= "disabled" attribute fails further server based validations.

http://jsfiddle.net/mhtet/

this should :)

in case link broken :)

$('select').live("mousedown", function(e) {     e.preventdefault(); //return false fails.     //alert("test"); //or show dialog     return; }); 

Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -