jQuery execute function when option is selected from option object

warlcok

New Member
I am dynamically creating the options for a select element using jQuery. Is it possible in jQuery to setup a function to be executed when that option is selected?I know I can detect the change of the entire select element, but is it possible to specify this on a per-option basis? Maybe something like this:\[code\]$('<option />').onselect(function(){ // do something});\[/code\]Edit:If it's not possible to specify a function that get's executed when a specific option is selected, is it possible to bind a function to an element in jQuery? It would make my logic cleaner by allowing me to just simply execute that function assigned to the option in the .change for the select.
 
Top