jQuery plugin call internal function
Posted
by
pbcoder
on Stack Overflow
See other posts from Stack Overflow
or by pbcoder
Published on 2010-12-31T12:50:45Z
Indexed on
2010/12/31
12:53 UTC
Read the original article
Hit count: 218
I want to call removeSomething() (see in line 9) internally:
JS-Code is:
(function($){
$.fn.extend({
Engine: function(options) {
var defaults = {
...
};
var options = $.extend(defaults, options);
removeSomething();
//-----------------------------------------------------------------------
//Public Functions ------------------------------------------------------
//-----------------------------------------------------------------------
this.removeSomething = function() {
...
};
}
});
})(jQuery);
But if I call removeSomething console outputs that removeSomething is not a function, how do I have to call this function? The function should be available internally and externally.
Thanks for help!
© Stack Overflow or respective owner