add on click to div using jquery
$(document).ready( function() { $("#viewclick").click( function() { // this will fire when you click view }); $("#editclick").click( function() { // this will fire when you click edit // hide the view button here and upon submit, show it again // like $("#viewclick").hide() or $("#viewclick").fadeOut() }); });