Merge JavaScript

You'll need to be careful on this one as sometimes you need the JS files to load in a particular order. Sometimes, merging is just not needed.

But for the very basic version, you'll just copy everything in between the <script> </script> tags (start and stop of the file) in the JS file, then copy it all to another file and paste it between the <script> </script> that exists in that file.

Again, sometimes it doesn't make sense to do this, so you'll want to check your site and code afterward and make sure it all still works.

If you're calling any jquery commands, you want to make sure that jquery loads FIRST, then you can add additional stuff.

A word of warning - if you make your javascript files too big, you'll slow down the speed of your site also.
 
To link a JavaScript file type
<script src=”file.js”></script>
It's best to put JavaScript files at the bottom of the body.
CSS is
<link rel=stylesheet” href=style.css”>
 
Top