jquery - What does putting a javascript function inside a '$()' do? -
i'm learning ajax right , jquery function being used submit form wrapped inside $( function() { } ) so. do?
$(function() { $('.error').hide(); $(".button").click(function() { // validate , process form here } });
this shortcut provided jquery running code on page ready. equivalent to:
$(document).ready(function() { ... });
jquery call function when page ready manipulated.
Comments
Post a Comment