Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed (Author was flagged for spam)

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

6
Help me, Reddit! I am working on a jQuery plugin, but the code structure needs work. Any tips?
Post Body

So I'm trying to make an HTML5/canvas drawing/animation plugin for jQuery. Functionally, it's coming along nicely, but actually using the plugin makes your code kinda... sloppy. Check out the plugin source here, but the example I have really shows the flaws.

I am replicating the functionality (API) of Processing and it's coming along pretty well. As you can see, though, all of the Processing functions I'm writing require you to also put $('#canvas') in front of each line. Is there a way I can set the default element once, and call each function with something simpler, like $.background('#FFFFFF'); ?

Also, any suggestions or feedback for the plugin itself would totally rock.

EDIT: Yes, I have heard of Processing.js. The reason I'm doing it like this is because regular javascript code doesn't work inside of <script type="application/processing"> tags.

Author
Account Strength
0%
Account Age
16 years
Verified Email
Yes
Verified Flair
No
Total Karma
8,235
Link Karma
866
Comment Karma
7,358
Profile updated: 5 months ago
Posts updated: 7 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
14 years ago