I originally thought that both of them were the same effect, so I replaced all the jQuery with native ones. Most of the code is fine, but one function has been reported wrong, so what"s the difference between these two pieces of code?
(function(){
})();
$(document).ready(function(){
});
what"s the difference between these two? Why does some code work well and others fail?
how should I write it if I want to use the native one?