Using code outside the livecoding_io environment?

39 views
Skip to first unread message

Evelyn Rios

unread,
Sep 28, 2013, 5:37:54 PM9/28/13
to liveco...@googlegroups.com
I've encountered an issue using code written inside livecoding_io outside the livecoding_io environment.

I made my own modification of the "D3:particles" example, using rectangles rather than circles, which can be found here:

But when I copied the exact code into JSFiddle, I got just the SVG body, and no rectangles:

Since JSFiddle doesn't give me a console log to see what's going on, I next put the code into a testing server on my laptop, then used Google Chrome's console log.
It showed this error:  Uncaught ReferenceError: $ is not defined
on the line of code:
var w = $('svg').width(), ]

How would I need to modify the code to make it work outside the livecoding.io environment, and why?

Gabriel Florit

unread,
Sep 30, 2013, 12:08:21 PM9/30/13
to liveco...@googlegroups.com
Hi Evelyn,

'$' is an alias for jQuery. '$ is not defined' means jQuery is not defined. Looks like you need to tell JSFiddle to load jQuery.


Gabriel
Reply all
Reply to author
Forward
0 new messages