1

I am trying to merge my JS files.

Anyway, I get an error like that: TypeError: (intermediate value)(...) is not a function at })(jQuery);. The code is the following:

(function($) {

    //function body and stuff

})(jQuery);

So, I put the code in JSLint, to check for syntax errors, brakes closure... everything is correct.

Any ideas?

UPDATE:

the file tha is being put before the file where I get the error (when merged): http://jsfiddle.net/ENDhB/1/

the file where I get the error: http://jsfiddle.net/ZTP6r/

I tried putting ; before the (function($) {, but then I get TypeError: $(...).makeacolumnlists is not a function in the 1st merged file.

Syspect
  • 921
  • 7
  • 22
  • 50
  • 1
    Any online link where this issue can be checked? – A. Wolff Jun 12 '14 at 10:11
  • 1
    do you actually have code in the function body? maybe something there is causing the issue but its reporting it at a diff location – olly_uk Jun 12 '14 at 10:11
  • can you please provide fiddler for that – Prabhat Jain Jun 12 '14 at 10:11
  • 2
    See http://stackoverflow.com/questions/20307462/js-cant-combine-lib-files that might be your issue – GillesC Jun 12 '14 at 10:13
  • 1
    @gillesc Seems relevant, then OP should try: `;(function($) {...})(jQuery);` – A. Wolff Jun 12 '14 at 10:16
  • I updated my question with JSFiddle examples and some things that I've tried. – Syspect Jun 12 '14 at 10:21
  • side-note: jsFiddle was down all morning but seems to be on/off at the moment: [**https://twitter.com/jsfiddle**](https://twitter.com/jsfiddle) might use jsBin or other service in the meantime – Nope Jun 12 '14 at 10:30
  • I cannot reproduce your issue with none of the two jsfiddles. Please create a single jsfiddle that reproduces your issue and tell us what browser you get the issue in. Also, please try to remove as much code as possible such that the issue still appears. – chiccodoro Jun 12 '14 at 11:25
  • (As a first bet, I remember I had issues with your syntax in the past and moved the closing parenthesis: `(function($) { ... } (jQuery));` – chiccodoro Jun 12 '14 at 11:27

0 Answers0