I have a select with an option it with id 'option1'. option1 is the currently selected option on page load.
In my $(document).ready, I have:
$(document).ready(function()
{
$("#option1").click(function()
{
alert("Testing");
});
});
However, the alert is never shown and the event never fires! Is it not possible or something to have an event on a select option as opposed to a select itself?
Note:
- I don't think I can bind to the select's click() event as I only want the event to fire if the current selected option is clicked on / selected again.
- I can't use the select's change() event as I only want it to fire if the currently selected option is clicked on, thus the option won't be changing.
Thanks