Toggle edit mode function
When you have a list with items it could be that you want to add a delete button to every row when in edit mode. It could be nice if there was some kind of "edit-mode" flag for a <li/> item which can be toggled by a button. Just a mockup:
- <ul id="lstItems">
- <li>Item 1</li>
- <li data-role="edit-mode">Item 1 <a href="#">delete</a></li>
- <li>Item 2</li>
- <li data-role="edit-mode">Item 2 <a href="#">delete</a></li>
- ....
- </ul>
- <a href="$('#lstItems').toggleEditMode()">Toggle edit mode</a>