What is the difference between Bower and npm?

All package managers have many downsides. You just have to pick which you can live with. History npm started out managing node.js modules (that’s why packages go into node_modules by default), but it works for the front-end too when combined with Browserify or webpack. Bower is created solely for the front-end and is optimized with … Read more

Get query string parameters url values with jQuery / Javascript (querystring)

Anyone know of a good way to write a jQuery extension to handle query string parameters? I basically want to extend the jQuery magic ($) function so I can do something like this: Which would give me the value “test” in the following URL: http://www.example.com/index.php?search=test. I’ve seen a lot of functions that can do this … Read more

How to add jQuery in JS file

I have some code specific to sorting tables. Since the code is common in most pages I want to make a JS file which will have the code and all the pages using it can reference it from there. Problem is: How do I add jQuery, and table sorter plugin into that .js file? I … Read more