开发者

Minify jQuery with PHP

What is the best way to minify jQuery with other js files. My goals is one request for all my JS files. I have about 6 other js files that I would like combine with jQuery and the jQuery UI. When I leave the jQuery library and UI library out of the minification file it is fine. So I have three requests:

  1. jQuery library
  2. jQuery UI
  3. minified remaining js files

I tried combining the 1&2 with 3 but jQuery always says it is undefined. I tried using both the minified and NON minified versions o开发者_StackOverflow中文版f jQuery.

I am using the php minify program from yahoo. Any suggestions?

Thanks, Brian


Make sure you combine them in the correct order. jQuery must be first.


Try using Reducisaurus, as long as you define the files in the right order everything should work fine.

PS: Make sure you cache the Reducisaurus minification, sometimes it is too busy to serve your files.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜