Last active
March 27, 2016 15:47
-
-
Save zy108830/5bdf75393194486c496f to your computer and use it in GitHub Desktop.
jquery对象的click事件绑定一个有名称的外部函数
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var editorHandler=function(){ | |
//$(this)即$('#wenjuan_remark'). | |
var $this=$(this); | |
$('#trigger-modal').trigger('click'); | |
$('#modal-editor').find('.action-calcel').click(function(){ | |
$('#modal-editor').find('.close').trigger('click'); | |
}); | |
$('#modal-editor').find('.action-ok').click(function(){ | |
$this.html(wenjuan_remark.$txt.html()); | |
$('#modal-editor').find('.close').trigger('click'); | |
}); | |
}; | |
$('#wenjuan_remark').click(editorHandler); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment