$("#discussMainBar .excerpt img").each(function (e) {
var $this = $(this);
$("<img/>").bind('load', function () {
$this.attr('data-width', this.width);
$this.attr('data-height', this.height);
}).attr("src", $this.attr('src'));
});
var $this = $(this);
$("<img/>").bind('load', function () {
$this.attr('data-width', this.width);
$this.attr('data-height', this.height);
}).attr("src", $this.attr('src'));
});
留言
張貼留言