私のコード:
(function($){
$.fn.extend({
popupbox: function(options) {
//Settings list and the default values
var defaults = {
photo_url : "",
photo_id : ""
};
var options = $.extend(defaults, options);
return this.each(function() {
var o = options;
//Assign current element to variable
var obj = $(this);
var photo_pic = $('#photo_box_img');
photo_pic.attr("src", o.photo_url);
photo_pic.load(function() {
var pic_width = photo_pic.width();
var pic_height = photo_pic.width();
console.log(pic_width);
}
});
}
});
})(jQuery);
初めて上記click
のimage
ボタンを使用すると、0がclick() function
返されますが、...なぜそうするのですか?next time
shows
proper width