I have a Jquery UI selectmenu object which I have generated dynamically from a database.
I need to get the selected text from it, if it wasn't an Jqueryu UI object I could use this at onChange event like that:
$('#l1').change(function() {
var selectedText= $('#l1 option:selected').text();
....
How could I get the same value for Jquery UI object? I mention that I can't rely on .val() property because all are 0. I did try this
var selectedText = $(this).find(':selected').text();
without success.