Skip to content

Commit 089a808

Browse files
committed
fix bug in development
use removeAttr
1 parent c85b822 commit 089a808

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

config.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ def iterate(length, label = "Item", &block)
7676
out
7777
end.join
7878
end
79+
80+
def file_kb(name)
81+
(File.size(name)/100.0).round / 10.0 if File.exists?(name)
82+
end
7983
end
8084

8185
set :css_dir, 'css'

source/index.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
Download
1616
%a(href="js/jquery-sortable-min.js") minified
1717
version
18-
(#{(File.size("source/js/jquery-sortable-min.js")/100.0).round / 10.0} kb, gzipped ~#{(File.size("source/js/jquery-sortable-min.js.gz")/100.0).round / 10.0} kb)
18+
(#{file_kb("source/js/jquery-sortable-min.js")} kb, gzipped ~#{file_kb("source/js/jquery-sortable-min.js.gz")} kb)
1919
#features
2020
.page-header
2121
%h1 Features

source/js/jquery-sortable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
},
8484
// Called when the mouse button is beeing released
8585
onDrop: function ($item, container, _super) {
86-
$item.removeClass("dragged").attr("style","")
86+
$item.removeClass("dragged").removeAttr("style")
8787
$("body").removeClass("dragging")
8888
},
8989
// Template for the placeholder. Can be any valid jQuery input

0 commit comments

Comments
 (0)