Welcome Guest [Log In] [Register]
This board has been archived and is no longer accepting new questions. If you have a support question for your ZetaBoard, please visit us at the new support board. Registration is free and easy.


Visit the NEW ZetaBoards Support forum!

Username:   Password:
Add Reply
How to create PlugIns
Topic Started: Aug 29 2008, 08:49 PM (2,464 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