8000 Refactor $.fn.css call · JavaScriptCodes/midnight.js@a298f01 · GitHub
[go: up one dir, main page]

Skip to content

Commit a298f01

Browse files
committed
Refactor $.fn.css call
Use a hash object instead of multiple calls to $.fn.css.
1 parent 4826f5b commit a298f01

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

midnight.jquery.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,13 @@
139139

140140
// Create the fake headers
141141
$originalHeader
142-
.css('position', 'fixed')
143-
.css('top', '0')
144-
.css('left', '0')
145-
.css('right', '0')
146-
.css('overflow', 'hidden');
142+
.css({
143+
position: 'fixed',
144+
top: 0,
145+
left: 0,
146+
right: 0,
147+
overflow: 'hidden'
148+
});
147149

148150
updateHeaderHeight();
149151

@@ -406,4 +408,4 @@
406408

407409
};
408410

409-
})(jQuery));
411+
})(jQuery));

0 commit comments

Comments
 (0)
0