trigger() related target - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:trigger

Description

trigger() related target

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.3.js"></script> 
  <script type="text/javascript">
    $(window).load(function(){/*from   w  ww  .j a v  a  2  s  .co  m*/
$(document).ready(function() {
    $("#btn_03").attr('checked', true);
    $("#btn_03").change(function() {
        console.log("clicked");
    });
    $("#btn_03").trigger("change");
});
    });

      </script> 
 </head> 
 <body> 
  <input type="radio" id="btn_03">  
 </body>
</html>

Related Tutorials