2013-03-18 39 views

回答

0

您需要在collapse原型中重新定义这些方法。

$.fn.collapse.Constructor.prototype.show = function() { 
    // your code 
} 

但是,如果你想扩展这些方法,并保持它们的默认行为,你可以这样做:

var tmp = $.fn.tooltip.Constructor.prototype.show; 
$.fn.collapse.Constructor.prototype.show = function() { 
    ... 
    tmp.call(this); 
    ... 
}