My below code works fine and is used to populate a <select>
item with dynamic <options>
The problem is that say I end up with 3 <options>
say: One / Two / Three and then I select the first <option>
so that I can call jquery code to populate the next menu. One is already the <selected>
item in the menu so it is not recognized as a onChange event.
So I would need to select Two then One to call the onChange for One.
Is there something I should use instead of onChange? Or should I put in a blank <option>
item as the default value? So there will always be a change?
//if the job menu is changed
$('#job').change (function ()
{
$.get('ajax/employee_menu.php', { job: $('#job').val() },
function(data)
{
//load the <options> into the element
$("#employee").html( data );
// show the menu once loaded
$("#employee").css({ "display" : "inline" });
});
});