0

I'm trying to create a jquery plugin

initially the plugin is used like

$('element').plugin;

Now, i want to extend it further to call specific operations like

$('element').plugin.create;

or

$('element').plugin.delete;

any way of doing this?

0

2 Answers 2

1

Read through this great tutorial on plugin creation from Justin Meyer

Sign up to request clarification or add additional context in comments.

Comments

0

That seems like you want to create a widget. Look here for a good explanation of what widgets do as opposed to plugins: http://bililite.com/blog/understanding-jquery-ui-widgets-a-tutorial/ Typically, you would then call your plugin's methods like this: $('element').plugin('create')

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.