The first uses jQuery to bind a function to the document.ready
event. The second declares and immediately executes a function.
More Related Contents:
- Location of parenthesis for auto-executing anonymous JavaScript functions?
- Why do you need to invoke an anonymous function on the same line?
- How to pass two anonymous functions as arguments in CoffeScript?
- Immediately-Invoked Function Expression (IIFE) In JavaScript – Passing jQuery
- Change from (+) symbol to (-) after click (function(){
- Remove element from JS injected HTML
- How can i create html automatic change page? [duplicate]
- Detecting input change in jQuery?
- how to get GET and POST variables with JQuery?
- Equivalent of String.format in jQuery
- jquery beforeunload when closing (not leaving) the page?
- How do I send an AJAX request on a different port with jQuery?
- Programmatically trigger “select file” dialog box
- How to stop intense Javascript loop from freezing the browser
- Get computed font size for DOM element in JS
- comparing 2 strings alphabetically for sorting purposes
- How can I remove all CSS classes using jQuery/JavaScript?
- How to hide Bootstrap modal with javascript?
- Webkit and jQuery draggable jumping
- jQuery JSON looping through nested objects
- function in setInterval() executes without delay
- How to check in js that user has checked the checkbox in Google recaptcha?
- Alert for unsaved changes in form
- new Image(), how to know if image 100% loaded or not?
- How to check if css value is supported by the browser?
- AngularJS : ng-model binding not updating when changed with jQuery
- how to read json result in jquery?
- How to change tabs programmatically in jquery-ui 1.9?
- Trigger for span text/html on changed
- Is there an “after submit” jQuery option?