assets/javascripts/fancybox/helpers/jquery.fancybox-thumbs.js in jekyll-theme-simple-texture-0.3.1 vs assets/javascripts/fancybox/helpers/jquery.fancybox-thumbs.js in jekyll-theme-simple-texture-0.3.2

- old
+ new

@@ -12,11 +12,11 @@ * } * } * }); * */ -;(function ($) { +(function ($) { //Shortcut for fancyBox object var F = $.fancybox; //Add helper object F.helpers.thumbs = { @@ -60,18 +60,17 @@ this.wrap = $('<div id="fancybox-thumbs"></div>').addClass(opts.position).appendTo('body'); this.list = $('<ul>' + list + '</ul>').appendTo(this.wrap); //Load each thumbnail $.each(obj.group, function (i) { - var el = obj.group[ i ], - href = thumbSource( el ); + var href = thumbSource( obj.group[ i ] ); if (!href) { return; } - $("<img />").on("load", function () { + $("<img />").load(function () { var width = this.width, height = this.height, widthRatio, heightRatio, parent; if (!that.list || !width || !height) { @@ -104,13 +103,11 @@ parent.width(thumbWidth).height(thumbHeight); $(this).hide().appendTo(parent).fadeIn(300); - }) - .attr('src', href) - .attr('title', el.title); + }).attr('src', href); }); //Set initial width this.width = this.list.children().eq(0).outerWidth(true); @@ -160,6 +157,6 @@ this.list = null; this.width = 0; } } -}(jQuery)); +}(jQuery)); \ No newline at end of file