I am trying to toggle two different views on the page. I have the users
personal info in <div id="edit_personal">content</>
 
So when the user clicks edit the content gets replaced with a form url:
"/manage/personal/edit",

What would be the best way to do this/ So if they click edit the content
gets replaced with the form, if they hit cancel the form gets replaces with
the original content?
 
<script type= "text/javascript">
$(document).ready(function(){
$("#edit_personal").click(function(){
  $("#edit_personal").toggle().ajax(function(){
   url: "/manage/personal/edit",
     cache: false
  });           
 return false; 
 });
 });
</script>
 
 
Thanks,
 
Dave

Reply via email to