Javascript plugin creation methods

Posted by Aneesh on Stack Overflow See other posts from Stack Overflow or by Aneesh
Published on 2010-04-14T09:38:45Z Indexed on 2010/04/14 9:43 UTC
Read the original article Hit count: 189

Filed under:

I want to create a plugin 'myPlugin' which simply add some text to a div. like:

 document.getElementById('testDiv').myPlugin("this is a text");

how can I achieve this through singleton method as well as prototype method ?

© Stack Overflow or respective owner

Related posts about JavaScript