Javascript vs jQuery Function Difference? -


i've been making program , want know difference between starting 2 functions so:

$(function () {    //content }); 

and

function name () {     //content } 

also, why can't name first example? tried changing first example second type, , function stopped working fully. i've used jquery first example , fine, different example, function stopped working.

so what's difference?

$(function () {}); shortcut $(document).ready(function(){});

while this:

function name () {     //content } 

is standard javascript function.


Comments