Overriding jQuery plugin methods, as default and for single instances

Posted by Kilgore2k on Stack Overflow See other posts from Stack Overflow or by Kilgore2k
Published on 2010-04-15T11:00:08Z Indexed on 2010/04/15 11:03 UTC
Read the original article Hit count: 197

Filed under:
|
|
|

Hi,

The basic question is: How do I perform a basic override of a plugin method without editing the original plugin file?

Is it possible to create an override for a specific instance:

Example: An rtf plugin uses:

$('selector').wysiwyg('setContent',newContent);

In order to display the rtf text as readonly I would like for the same method to be applied to a div instead of the body of the IFRAME

I would like to overwrite the original 'setContent' with my own code, just for this one element.

Thanks

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about plugin