This is default for all js
getEditor: function(){
$( '#datatableEditor' ).remove();
var editor = $( '<div id="datatableEditor" class="popupEditor"/>' );
$( 'body' ).prepend( editor );
var dialog = $(editor).dialog({
title: 'Edit item',
modal: true,
width: 'auto',
height: 'auto'
});
Now I am writing another js. I need to override the getEditor
in my js...
You haven't described your question, clearly but based on what you have mentioned in the title:
override the existing function in jquery
It seems you want to change a jQuery function and they usually are defined like $.fn.getEditor
if it is the case, you should do:
(function ($) {
var oldGetEditor = $.fn.getEditor;
$.fn.getEditor = function() {
//you can call the oldGetEditor here if you want
};
})(jQuery);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With