Skip to content

Commit 2de0ec4

Browse files
committed
fixed margins on update
1 parent 382b9ec commit 2de0ec4

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

README.markdown

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
(Only the most recent changes are shown below, see the [wiki page](https://github.com/chriscoyier/MovingBoxes/wiki/Change-Log) for a complete listing)
1111

12+
###Version 2.0.5 (6/9/2011)
13+
* Fixed margins when MovingBoxes gets updated. Fix for issue #30.
14+
1215
###Version 2.0.4 (5/7/2011)
1316
* Fixed hash tags which apparently broke in the last version =/
1417

js/jquery.movingboxes.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Moving Boxes v2.0.4
2+
* Moving Boxes v2.0.5
33
* by Chris Coyier
44
* http://css-tricks.com/moving-boxes/
55
*/
@@ -108,7 +108,7 @@
108108
// Set up panes & content sizes; default: panelWidth = 50% of entire width
109109
base.$panels = base.$el.find(base.options.panelType)
110110
.addClass('mb-panel')
111-
.css({ width : base.options.width * base.options.panelWidth })
111+
.css({ width : base.options.width * base.options.panelWidth, margin: 0 })
112112
// inner wrap of each panel
113113
.each(function(){
114114
if ($(this).find('.mb-inside').length === 0) {
@@ -238,7 +238,7 @@
238238
}
239239

240240
// don't do anything if it's the same panel
241-
if (base.initialized && base.curPanel == curPanel && !flag) { return false; }
241+
if (base.initialized && base.curPanel === curPanel && !flag) { return false; }
242242

243243
// abort if panel is already animating
244244
if (!base.currentlyMoving) {

js/jquery.movingboxes.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)