我有以下代码:
<script>
jQuery(document).ready(function ($) {
'use strict';
var Image_Selector = function () {};
Image_Selector.prototype.init = function ($wrapper) {
this.$select_btn = $wrapper.find('.set-image-btn');
this.$select_btn.click(function (e) {
console.log(this); //jquery object
console.log(e); //just the event
// What's the best way to call 'open_image_selector()' here?
});
}; // init
Image_Selector.prototype.open_image_selector = function () {
console.log (this);
// do awesome stuff
};
}); // doc rdy
</script>
open_image_selector
在函数内部调用的最佳方法是jquery.click
什么?