javascript - how to override the existing function in jquery -


इस सवाल का पहले से ही एक उत्तर है: < / P>

  • 5 जवाब

    ये सभी जेएस के लिए डिफ़ॉल्ट है <पूर्व> getEditor: फ़ंक्शन () {$ ('#datatableEditor') .remove (); Var एडिटर = $ ('& lt; div id = "डाटाएबल एडिटर" वर्ग = "पॉपअप एडिटेटर" / & gt;'); $ ('बॉडी')। प्रीपेंड (संपादक); Var संवाद = $ (संपादक) .dialog ({शीर्षक: 'आइटम संपादित करें', मोडल: सच, चौड़ाई: 'ऑटो', ऊंचाई: 'ऑटो'});

    अब मैं एक और जे एस लिख रहा हूं। मुझे अपने जेएस में getEditor ओवरराइड करने की आवश्यकता है ...

    आप हेवन अपने प्रश्न का स्पष्ट रूप से वर्णन नहीं किया गया, लेकिन आपने जो शीर्षक में उल्लेख किया है उसके आधार पर:

    jquery में मौजूदा फ़ंक्शन को ओवरराइड करें

    ऐसा लगता है कि आप चाहते हैं एक jQuery के फ़ंक्शन को परिवर्तित करें और वे आमतौर पर $ .fn.getEditor जैसे परिभाषित होते हैं, यदि ऐसा है तो आपको करना चाहिए:

      (फ़ंक्शन ($) {var oldGetEditor = $ .fn.getEditor; $ .fn.getEditor = function () {// यदि आप चाहते हैं तो आप पुराने गेट एडिटर को कॉल कर सकते हैं};}) (jQuery);    

Comments

Popular posts from this blog

wpf - ControlTemplate with changes for every class -

ios - UIWebView content not adjusted to new frame after rotation -

c - Performance of System() -