Javascript examples for jQuery Method and Property:on
Reloading a div with javascript without reloading the whole page
<html> <head> <script src="https://code.jquery.com/jquery-latest.js"></script> <script> $(document).ready(function() { $('#btn_click').on('click', function () { $('#publish').html($('#publish').html() + 1); });/* ww w .j a va 2 s .c o m*/ }); </script> </head> <body> <div id="publish"> 5 </div> <button type="button" id="btn_click">clickme</button> </body> </html>