3 ms·
But the post isn't claiming to provide everything that Jquery provides just replacing the "$" function. The "$" does two things in jQuery. 1. Its the DOM selec
by mikeryan 11y ago
But the post isn't claiming to provide everything that Jquery provides just replacing the "$" function. The "$" does two things in jQuery.
1. Its the DOM selection function. This is what he's replacing. This is the real "functionality" of the $ function. The main bit missing is that it won't create a new element if you pass in a string.
Return a collection of matched elements either found in the DOM based on passed argument(s) or created by passing an HTML string.
2. Its a Namespace for all the rest of Jquery. This is NOT what Paul's replacing but is kind of ancillary and really just good housekeeping for a js lib.
- dsp1234 11y ago3. It also provides a DOMContentLoaded handler. $(function(){console.log('DOMContentLoaded')})