SyntaxFix
Write A Post
Hire A Developer
Questions
Try this $('div').myFunction();
$('div').myFunction();
This should work
$(document).ready(function() { $('#btnSun').click(function(){ myFunction(); }); function myFunction() { alert('hi'); }