How to minify jquery files?

2020-02-07 01:58发布

I am using jquery and I got a couple plugins that don't offer a minified version. So I want to take the full version and minfiy it but all the sites I have found that you input your javascript and it minifies it breaks the plugin.

Like it must strip something out because I get a syntax error.

So anyone got a good one that I can use?

7条回答
放我归山
2楼-- · 2020-02-07 02:27

If you have PHP5 and Zlib on your server, then try this one! http://code.google.com/p/minify/

I use it to combine jQ, jQ Plug-ins, jQ-UI, and custom site application client-code into a single file.

I then load that JS file and a small page-specific JS file (with onload, etc) onto each page. It works well...and it also handles CSS.

I don't leave home without it. (that's just a saying :)

查看更多
登录 后发表回答