dom操作のためにjQueryにコールバックを追加できるかどうか知りたいです:
- 追加
- 付加する
- addClass
- トグルクラス
- removeClass
- val
- 文章
- css
- attr
- html
- 隠れる
- 等
新しいイベントのように機能するもの。
例:
$('#mydiv').bind('hide', function(){
console.debug('someone call hide function')
});
//then in other js file, other function, anywhere.
$('#mydiv').hide();
//hide and output 'someone call hide function'
.queueとjQuery.Callbackを見ましたが、この関数の独自のラッパーを作成した場合にのみ機能しますか?
多分jQueryプラグイン?
これは、すべてのjsがこのプラグインを呼び出すことを変更せずに実行できますか?このようではない何か:
$('#mydiv').myPluginsHide();
ありがとう。