Skip to content

Commit

Permalink
Fix style and variable scope
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Schuller committed Dec 19, 2013
1 parent 0cf79ab commit 41f6ce0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/jquery.spritely.js
Expand Up @@ -239,7 +239,6 @@
var $this = $(this),
el_id = $this.attr('id'),


options = $.extend({
type: 'sprite',
do_once: false,
Expand All @@ -250,7 +249,10 @@
fps: 12,
no_of_frames: 2,
play_frames: 0
}, options || {});
}, options || {}),

background_image = (new Image()),
background_image_src = $._spritely._spStrip($this.css('background-image') || '', 'url("); ');

if (!$._spritely.instances) {
$._spritely.instances = {};
Expand All @@ -271,11 +273,8 @@
options.width = options.width || $this.width() || 100;
options.height = options.height || $this.height() || 100;


background_image = (new Image()),
background_image_src = $._spritely._spStrip($this.css('background-image') || '', 'url("); ');

background_image.onload = function() {

options.img_width = background_image.width;
options.img_height = background_image.height;

Expand Down

0 comments on commit 41f6ce0

Please sign in to comment.