jquery - Change event for a multiple select -
i fire code when number of option elements within multi select changes.
here html looks like:
<select id="id_foods_to" multiple="multiple" size="0" name="foods" class="filtered"> <option value="1">stuff</option> <option value="2">more stuff</option> <select>
and here code wrote failed accomplish goal:
$("#id_foods_to").change(function () { alert('success!'); });
also, i'm using http://bitkickers.blogspot.ca/2010/05/reuse-djangos-filterhorizontal-admin.html
you code works, delete select ending tag in first line..
<select id="id_foods_to" multiple="multiple" name="foods" class="filtered"> <option value="1">stuff</option> <option value="2">more stuff</option> </select>
Comments
Post a Comment