I’m creating a small plugin that creates and shows a new div when a link is clicked on. Hides the div when it is clicked on again. I am basing it on the upcoming jQuery UI Tooltip plugin. The specific function of the plugin doesn’t matter too much at the moment but it is throwing the error below when i run it.
Uncaught TypeError: Cannot read property ‘content’ of undefined
Full code and testing enviroment can be seen here: http://jsfiddle.net/mwillmott/LRrZU/
Any thoughts?
Your problem in this string:
when event handling your method “open” have “this == this.element” NOT YOUR object.
Fix your problem:
See example
PS: Your code contain undefined _bind method.