Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

TypeError: c.css is not a function after jslimming jquery.min #5

DanielRuf opened this Issue Aug 5, 2012 · 4 comments


None yet
2 participants

I get TypeError: c.css is not a function after running jslim.

Tried to add css to externs.txt but nothing changed.

When I use jquery-1.7.2 I get Error: Syntax error, unrecognized expression: hidden


zgrossbart commented Aug 5, 2012

Thanks for trying JSlim. Could you please give me some more information about what you're trying to do. Where do you see this error? What command are you trying to run? Any ideas how I can reproduce this problem?


I use the commands described in the main README.md file of the repo.

When I take a look at the generated js files, the css function is completely missing, but not in the original jquery file.

Some code I use:

    var test = $(".span6").width();
    var test2 = $(".span12").width();
    var test_h = $("#mmm").height();
function calcSizes() {
    test = $(".span6").width();
    test2 = $(".span12").width();
    var value = test / 5.10909091;
    var value2 = test / 7.20513;
    var value3 = test2 / 38.3;
    var value4 = test / 56.267;
    var value5 = test2 / 57.45;
    var hspace = value2 / 2;


zgrossbart commented Aug 5, 2012

The short answer is that there's a soft dependency that isn't getting followed. My guess is that the css function has a dependency on something else. Do you have a fll project that I could check out? Otherwise you just need to try to track down the dependency.

Sure, I am working on a custom jquery version

So there is the javascript code I use at the end which causes the problems.

It is not so easy to find out which functions have to be added to the externs file

Also there is some difference:
jquery.min: removed 110 out of 324 ...
jquery-1.7.2: removed 106 out of 324 ...

So when I use the 1.7.2 version, I see the other error.

Any updates? Want to test it soon again with jQuery 1.8

@DanielRuf DanielRuf closed this Feb 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment