I come here with a lot of questions, so let's get started:
I want to know some things about the syntax used to create jquery, since I want to learn from it how to use it for myself.
Question 1: Getting jQuery library
(function( window, undefined ) {
var jQuery = function( selector, context ) {
return new jQuery.fn.init( selector, context );
},
_jQuery = window.jQuery, .......
I would like to know what is meant by the parenthesis before such a function "(function (window ..." so far I have only declared my function like this
function myFunc(myArg1,myArg2){
}
Question 2:
At the end of the jquery library, I seem to understand that the $ sign is assigned in the global scope, so we can use $ any for selectors, which I don’t understand is what "(window);" does expression at the very end means and what purpose it serves.
};
});
window.jQuery = window.$ = jQuery;
})(window);
: javascript-, , : "ds.functionName(Arg1)"; , JQuery $
: D