Codepedia
.info
Home
About
Demos
Tools
SVG Wave Generator
Colors
Edit This Code :
<html> <head><script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> </head> <body> <input type='checkbox' id='chkFollow'>Follow Me <button id="btnCheckStatus">Click me</button> <script> $(document).ready(function(){ var chkItem = $("#chkFollow"); $("#btnCheckStatus").on('click', function () { if ($(chkItem).is(":checked")) { console.log("Yes you are following "); alert("Yes you are following "); } else { console.log("No you are not following"); alert("No you are not following"); } }); }); </script> </body> </html>
➤ Run / View
Result :