hey all,
Im stumped.
I have the following code..works fine in all browsers except IE (shocking…I know)
$('#lbAvailableResources option').live('click', function() {
if($('#ulResourcesAssigned').text() === 'No resources assigned')
$('#ulResourcesAssigned').text('');
//create a new listitem that will be added to the list of assigned resources
$('<li>').val($(this).val()).text($(this).text()).appendTo('#ulResourcesAssigned'); });
the listbox (#lbAvailableResources) is loaded via an ajax call when the page loads.
Ive also tried the following:
1. I tried the delegate() method…no dice
2. I tried livequery…no dice
any help would be greatly appreciated.
There are no events on the
optionelement in IE.The
selectelement may be implemented as an OS widget, in which case you can forget getting any fine-grained mouse events on sub-parts of the control.The
changeevent onselectis the only cross-browser-compatible way to be informed of a change of option. Note that keyboard navigation may also fire this event.If what you want is a control that pops up a list of options and lets you add content to another element whenever any option is clicked, the
selectelement is ill-suited. Try instead a pop-updivcontaining buttons.