Home > front end >  How to fire a function when selecting an idem in a dropdown in jSuites?
How to fire a function when selecting an idem in a dropdown in jSuites?

Time:04-04

I'm trying to create a dropdown menu with jSuites that fires a function once one of the items in the list is selected.

Unfortunately, I can't figure out how to fire the function. I tried with "onchange" both as attribute of the <div> and within the definition fo the jdropdown, but nothing seems to work.

I attach a fiddle here with a dropdown menu made with that works and does what it should, and two jSuites menus that should behave in the same way but they don't...

What am I doing wrong?

Can this be done at all?

Any help is welcome...

http://jsfiddle.net/2x4qnj1h/1/

CodePudding user response:

use that instead:

onchange: refresh_dropdown,

you used a literal, not a function.

Documentation with examples : https://jsuites.net/v4/dropdown-and-autocomplete/events

  • Related