Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
How to create PlugIns
Topic Started: Aug 29 2008, 08:49 PM (264 Views)
Viral
Member Avatar
i'm stanley nao
[ *  *  *  *  * ]
Basically, I want to know how to make my own jQuery functions/plugins so I can do this:

$("#lol").omgomg();

where omgomg = function(){alert("omgomg");}
Offline Profile Quote Post Goto Top
 
Dan T
Member Avatar
document.createElement("Alcohol")
[ *  * ]
http://docs.jquery.com/Plugins/Authoring

have you looked into something like that?
Offline Profile Quote Post Goto Top
 
Chris
Member Avatar
Member
[ *  *  *  * ]
Here is an example of my own.

http://scripts.thundercodes.com/contextMenu.js

It is a basic plugin for a context menu. (The one they have is a nightmare..)
Offline Profile Quote Post Goto Top
 
Viral
Member Avatar
i'm stanley nao
[ *  *  *  *  * ]
Thanks, I'll check it out, oh and Chris, I was actually going to be making a contextMenu plugin o.0 .
Offline Profile Quote Post Goto Top
 
Chris
Member Avatar
Member
[ *  *  *  * ]
If you want to use that one I have no problem, editing or otherwise. It's pretty simple to use.

$("...").contextMenu(selector, attributes, menu);

... = element to bind the menu to
selector = context menu element (don't use $() around it.. just what you would put inside
attributes = apply any object of attributes to it
menu = apply a element id
Edited by Chris, Aug 30 2008, 02:35 PM.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · jQuery Help · Next Topic »
Add Reply