I have a form which has edit and save buttons switched to make the input box editable and disable. What I need here is to add a successful message next to the input box. HTML\[code\]<form> <label>First Name</label> <input type="text" placeholder="Lorem" readonly required /><input name="Edit" type="button" value="http://stackoverflow.com/questions/15656037/Edit"> <span class="alert">test</span> <label>First Name</label> <input type="text" placeholder="Lorem" required readonly /><input name="Edit" type="button" value="http://stackoverflow.com/questions/15656037/Edit"> <label>Email ID</label> <input type="email" placeholder="Lorem" required readonly /><input name="Edit" type="button" value="http://stackoverflow.com/questions/15656037/Edit"> <label>Password</label> <input type="password" placeholder="********" required readonly /><input name="Edit" type="Button" value="http://stackoverflow.com/questions/15656037/Edit"> </form>\[/code\]Script\[code\]$('[name="Edit"]').on('click', function() { var prev = $(this).prev('input'), ro = prev.prop('readonly'); prev.prop('readonly', !ro).focus(); $(this).val(ro ? 'Save' : 'Edit'); $(".alert").fade();});\[/code\]Here is the fiddle.This is how I need to show the message when it is saved