0

私のコード:

(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);

初めて上記clickimageボタンを使用すると、0click() function返されますが、...なぜそうするのですか?next timeshowsproper width

4

0 に答える 0