I've got a simple semantic-ui checkbox as follows:
<div id="del-checkbox-div" class="ui checkbox">
<input type="hidden" value="0" name="delete_show_data" onclick=check()>
<input id="delete-data-checkbox" type="checkbox" value="1" name="delete_show_data" onclick=check()>
<label for="delete-data-checkbox">Delete show data</label>
</div>
I'd like to preset its state on page load. Per the semantic-ui documentation I should be able to do the following in javascript:
jQuery('#del-checkbox-div').checkbox('behavior', 'uncheck');
However, I'm getting the following error:
TypeError: jQuery(...).checkbox is not a function
Can someone clue me in as to what I might be doing wrong?
Aucun commentaire:
Enregistrer un commentaire