how to bind click event of div

Viewed 46178
<div id="profile_ops" style="display:none">
  <button class="ybutton" id="viewclick" >View</button>&nbsp;
  <button class="ybutton" id="editclick" >Edit</button>&nbsp;
  <button class="ybutton" id="change_pswd" >Change Password</button>&nbsp;
  <button class="ybutton"  id="change_pic" >Change Picture</button>&nbsp;
</div>

in this i show this div on particular condition and i hide the view button but on edit click i show the view button but i want to give click event of view button where should i give the click event of div ?

i have tried giving the click event in edit click but it is giving me errro?

7 Answers
Related