简体   繁体   中英

Minified JS causes JS to not work

I'm using carabiner for CodeIgniter which can minify all the javascript files it loads. Well, I have about 10 files that work fine, then when minified, they don't... I'm not sure exactly what doesn't work, there are no errors, just certain features that don't work. Is there any particular reason why minifying JavaScript would cause it to not work?

You may want to try running JSLint on your Javascript code before you try to minimize it. JSLint might highlight some issues, which could allow you to minimize your code without error.

Or you may want to try another 'minification' tool.

Here are two articles I've found on 'A List Apart,' that may interest you, looking at the YUI Compressor.

" Better JavaScript Minification "
" JavaScript Minification Part II "

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM