Search code examples
javascriptjqueryhtmlcssjsplumb

jsPlumb setContainer method nonexistent: "Uncaught TypeError: undefined is not a function"


I just started using jsPlumb and it seems really great but I'm getting some weird bugs with it and after reading around, people have said it might be to do with not setting a container.

The problem is, if I try and call jsPlumb.setContainer($('.container')); Inspect Element in Chrome gives me a TypeError:

Uncaught TypeError: undefined is not a function

Everything else I seem to do with jsPlumb seems to work (makeSource/makeTarget/etc.).

I looked at the API and it doesn't look like setContainer() has been removed or anything.

Any ideas?

Thanks in advance.


Solution

  • Same problem, I had a div with id="container"

    and I solved with

    jsPlumb.Defaults.Container = $('#container');