Access to methods of the plugin, after selecting an element...
Hello,
I tried to find an answer but can't find it.
So I have a plugin and add it to an element by:
Everything works fine.
Now I want to select one of the input fields an call a method of the plugin.
So:
- // Select Element (I have the id)
- var input = $('#myInput');
// And calling a method
- input.myMethod();
But it is not there.
What is my misstake?
The code of the plugin:
- $.fn.tooltipo = function(optionen){
- // ..... some code
- this.myMethod = function(){
- console.log("Bing");
- // ..... some code
- }
- ...
Thank you!