I am working on this fiddle: http://jsfiddle.net/cED6c/7/ I want to make the button text change on click and I tried using the following code:
something easy like this
$(document).ready(function () { $('a.edit').click(function () { var txt = $(this).text(); txt = (txt !='cancel') ? 'cancel' : 'edit'; $(this).text(txt); $('.editForm').toggle(300); }); });