callback for button click

Siddangoud Bharamagoudar 61 Reputation points
2024-02-12T10:16:42.8366667+00:00

we have the code for callback function like below $(document).ready(function(){ $("button").click(function(){ $("p").hide("slow", function(){ alert("The paragraph is now hidden"); }); }); });

it is working fine ..

why my below code is not working do not alter the code , pls tell us why it not working




  
  
  
  




<div>

</div>

<button>Hide Div</button>
<button>Hide Div11</button>








Microsoft 365 and Office | Development | Office JavaScript API
Microsoft 365 and Office | SharePoint | For business | Windows
Developer technologies | C#
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Siddangoud Bharamagoudar 61 Reputation points
    2024-02-12T17:10:52.3833333+00:00

    Hi All pls let me know why this code is not working we have the code for callback function like below $(document).ready(function() { $("button").click(alert('Good Morning',function() { alert("The paragraph is now hidden"); }); });


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.