javascript - Drop down menu not work -


i'm developing easy web application, , i'm using 2 js libraries: dat.gui , three.js.

my problem drop down menu locked. can't open it.

// gui initialization (dat.gui) function initgui() {      var options = function() {         this.tenda = 'bar';     };      config = new options();     var gui = new dat.gui();     var subgui = gui.addfolder('setting');     subgui.open();      // callbacks     subgui.add( config, 'tenda', ['bar', 'pie', 'area']).         onchange(             function() {                 if (config.tenda === 'bar') { ... }                 else if (config.tenda === 'pie') { ... }                 else if (config.tenda === 'area') { ... }             }         ); }; 

reading on web, seems known issue, in examples, see drop down menus working well. i'm new js, , thought "maybe there scoping issue", put initialization process inside function work. problem remains.

i'm working on ubuntu/chrome , ubuntu/firefox. check entire code here, use check boxes instead of drop down menu.

i face same problem. in code, listen mouse click event. , callback function that:

function ondocumentmousedown( event ) {     event.preventdefault();      ... //other code } 

i found out problem "event.preventdefault();", prevent clicking on drop down list, commenting it, problems solved. can check other functions related mouse click event.


Comments

Popular posts from this blog

Change the color of an oval at click in Java AWT -

c# - Unity IoC Lifetime per HttpRequest for UserStore -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -