Adding a new item to a checklist

Paiscavast

New Member
I am trying to create a checklist that allows users to add their own items.This is part of my HTML:\[code\]<tr> <td> <input name="checkbox65" id="checkbox65" type="checkbox" /> </td> <td> <label for="checkbox65">Get directions for where you are going</label> </td></tr> <h3> My items </h3><fieldset data-role="controlgroup"> <label for="textinput4">Add new item</label> </td> <input name="new_item" id="textinput4" placeholder="" value="" type="text" /></fieldset> <input type="submit" id="add" value="http://stackoverflow.com/questions/13703232/Add" />\[/code\]And this is my script:\[code\]<script> $('#add').on('click', function (e) { var $this = $(this); var $newRow = $this.closest('table').find('tr:first').clone(); $newRow.find(':input').val(''); $newRow.insertAfter($this.parent()); });</script>\[/code\]But I just do not get any response..
 
Back
Top