Select Image dropdown with click function.
The following code produces the images in the dropdown select box, but does not process the click function.
<select id="ipselect" name="ipselect" size="15" style="width:150px" >
<?php echo $IP; ?>
</select>
<script language="javascript" type="text/javascript">
$(document).ready(function() {
$("#ipselect").msDropDown();
$('#ipselect').click(function() {
alert("selected!");
});
});
</script>
Using the same code, I alter the $("#ipselect").msDropDown(); to a bogus ID such as ipselect1. The jquery dropdown select is gone, and the default select box is viewable. When I click one of the options, the click function processes with no issues.
Is it not possible to use the click function with the dropdown select code?
FYI, I think the image dropdown code was posted on the jquery site as a tutorial.