I have a form select with class="yesno" which I populate by binding to a cfc. After binding, the options are set as follows:
<select id="FullYear" class="yesno" name="FullYear">
I want to use jQuery to change the text of the option values with 1 and 0 from true and false to Yes and No. I've tried to do this with the following jQuery code:
I've tested this code with a static select option (populated in the html code -- not programatically) and it works, but it does NOT work on the select whose options are populated by binding to the cfc.
I "think" this is because the option tags do not exist immediately when the page loads (so there is nothing yet for jQuery to act upon).
How can I get things to work?
I've read a little about jQuery on() and delegate() but I don't really know how to use them (or if they are the right tools).