You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.markdown
+15-5
Original file line number
Diff line number
Diff line change
@@ -9,14 +9,24 @@
9
9
10
10
(Only the most recent changes are shown below, see the [wiki page](https://github.com/chriscoyier/MovingBoxes/wiki/Change-Log) for a complete listing)
11
11
12
+
###Version 2.1 (6/10/2011)
13
+
* The script now prevents changing slides before it completes initialization. Fix for [issue #29](https://github.com/chriscoyier/MovingBoxes/issues/29).
14
+
* Removed element specific resizing:
15
+
* Removed `imageRatio` option. Set the image using a percentage width and it will adjust the height automatically to maintain the image's aspect ratio.
16
+
* In the script, the portion which set the height of images was removed. So now all panel content is set using css percentage values (or "em" for font sizes).
17
+
* Moved CSS, including `.mb-inside img {}` to the demo.css since the layout now allows images of any size inside the panels. The dimensions should now be set in the css using a percentage value.
18
+
* MovingBoxes will update a second time once the page has completely loaded. This now causes a vertical height resizing animation in webkit browsers. One way to work around this is to set the image height of the "current" panel - see the demo.css file.
19
+
* Removed `panelType` options as the script now automatically looks for immediate children of the initialized element. You shouldn't even notice a difference.
20
+
* Moved all demo related files into a demo folder.
21
+
12
22
###Version 2.0.5 (6/9/2011)
13
-
* Fixed margins when MovingBoxes gets updated. Fix for issue #30.
23
+
* Fixed margins when MovingBoxes gets updated. Fix for [issue #30](https://github.com/chriscoyier/MovingBoxes/issues/30).
14
24
15
25
###Version 2.0.4 (5/7/2011)
16
26
* Fixed hash tags which apparently broke in the last version =/
17
27
18
28
###Version 2.0.3 (4/22/2011)
19
-
* Adjusted width of MovingBoxes internal wrapper to fix issue #24.
29
+
* Adjusted width of MovingBoxes internal wrapper to fix [issue #24](https://github.com/chriscoyier/MovingBoxes/issues/24).
20
30
* Restructured the plugin to allow updating MovingBoxes after adding or removing a panel.
21
31
* To use, simply call the plugin a second time without any options: `$('.slider').movingBoxes();`
22
32
* These new changes now require a minimum of jQuery version 1.4.2 (due to the use of "delegate()").
@@ -35,9 +45,9 @@
35
45
* Added a separate IE stylesheet for versions < 9. Older IE versions will use a background image to add an inner shadow. It is using a png file, so it may not work properly in all older versions.
36
46
37
47
###Version 2.0.1 (3/31/2011)
38
-
* Added more width to the scroll container. Fix for issue #19.
39
-
* Centered the image... silly css problem. Fix for issue #20.
40
-
* Moving boxes will no longer scroll when using the space bar or arrow keys inside an input, selector or textarea. Fix for issue #22.
48
+
* Added more width to the scroll container. Fix for [issue #19](https://github.com/chriscoyier/MovingBoxes/issues/19).
49
+
* Centered the image... silly css problem. Fix for [issue #20](https://github.com/chriscoyier/MovingBoxes/issues/20).
50
+
* Moving boxes will no longer scroll when using the space bar or arrow keys inside an input, selector or textarea. Fix for [issue #22](https://github.com/chriscoyier/MovingBoxes/issues/22).
41
51
42
52
###Version 2.0 (3/11/2011)
43
53
* Made all css class name more unique by adding a "mb-" in front. Fix for [issue #15](https://github.com/chriscoyier/MovingBoxes/issues/15).
Copy file name to clipboardexpand all lines: demo/demo.js
+4-7
Original file line number
Diff line number
Diff line change
@@ -7,32 +7,29 @@ $(function(){
7
7
$('#slider-one').movingBoxes({
8
8
startPanel : 4,// start with this panel
9
9
width : 300,// overall width of movingBoxes (not including navigation arrows)
10
-
imageRatio : 1,// Image ration set to 1:1 (square image)
11
10
wrap : true,// if true, the panel will "wrap" (it really rewinds/fast forwards) at the ends
12
11
buildNav : true,// if true, navigation links will be added
13
-
panelType : '> li',// selector to find the immediate ">" children "li" of "#slider-one" in this case
14
12
navFormatter : function(){return"●";}// function which returns the navigation text for each panel
15
13
});
16
14
17
15
$('#slider-two').movingBoxes({
18
16
startPanel : 3,// start with this panel
19
-
width : 600,// overall width of movingBoxes (not including navigation arrows)
17
+
width : 650,// overall width of movingBoxes (not including navigation arrows)
20
18
panelWidth : .7,// current panel width adjusted to 70% of overall width
21
-
imageRatio : 16/9,// Image ratio set to 16:9
22
19
buildNav : true,// if true, navigation links will be added
23
20
navFormatter : function(index,panel){returnpanel.find('h2 span').text();}// function which gets nav text from span inside the panel header
24
21
});
25
22
26
23
// Add a slide
27
-
varimageNumber=1,
28
-
panel='<li><img src="images/*.jpg" alt="picture" /><h2>News Heading #*</h2><p>A very short exerpt goes here... <a href="#">more</a></p></li>',
24
+
varimageNumber=0,
25
+
panel='<li><img src="demo/*1.jpg" alt="picture" /><h2>News Heading #*2</h2><p>A very short exerpt goes here... <a href="#">more</a></p></li>',
29
26
// to test adding/removing panels to the second slider, comment out the line above and uncomment out the line below - slider-two uses divs instead of UL & LIs
30
27
// panel = '<div><img src="images/*.jpg" alt="picture" /><h2>News Heading #<span>*</span></h2><p>A very short exerpt goes here... <a href="#">more</a></p></div>',
31
28
slider=$('#slider-one');// $('#slider-two'); // second slider
<p>A very short exerpt goes here... <ahref="http://flickr.com/photos/justbcuz/112479862/">more</a></p>
48
+
<p>Add a short exerpt here... <ahref="http://flickr.com/photos/justbcuz/112479862/">more</a></p>
49
49
</li>
50
50
51
51
<li>
52
-
<imgsrc="images/2.jpg" alt="picture" />
52
+
<imgsrc="demo/2.jpg" alt="picture" />
53
53
<h2>News Heading</h2>
54
-
<p>A very short exerpt goes here... <ahref="http://flickr.com/photos/joshuacraig/2698975899/">more</a> and a whole lot more text goes here, so we can see the height adjust.</p>
54
+
<p>Add a short exerpt here... <ahref="http://flickr.com/photos/joshuacraig/2698975899/">more</a> and a whole lot more text goes here, so we can see the height adjust.</p>
55
55
</li>
56
56
57
57
<li>
58
-
<imgsrc="images/3.jpg" alt="picture" />
58
+
<imgsrc="demo/3.jpg" alt="picture" />
59
59
<h2>News Heading</h2>
60
-
<p>A very short exerpt goes here... <ahref="http://flickr.com/photos/ruudvanleeuwen/468309897/">more</a></p>
60
+
<p>Add a short exerpt here... <ahref="http://flickr.com/photos/ruudvanleeuwen/468309897/">more</a></p>
61
61
</li>
62
62
63
63
<li>
64
-
<imgsrc="images/4.jpg" alt="picture" />
64
+
<imgsrc="demo/4.jpg" alt="picture" />
65
65
<h2>News Heading</h2>
66
-
<p>A very short exerpt goes here... <ahref="http://flickr.com/photos/emikohime/294092478/">more</a></p>
66
+
<p>Add a short exerpt here... <ahref="http://flickr.com/photos/emikohime/294092478/">more</a></p>
67
67
</li>
68
68
69
69
<li>
70
-
<imgsrc="images/5.jpg" alt="picture" />
70
+
<imgsrc="demo/5.jpg" alt="picture" />
71
71
<h2>News Heading</h2>
72
-
<p>A very short exerpt goes here... <ahref="http://www.flickr.com/photos/fensterbme/499006584/">more</a></p>
72
+
<p>Add a short exerpt here... <ahref="http://www.flickr.com/photos/fensterbme/499006584/">more</a></p>
73
73
</li>
74
74
75
75
<li>
76
-
<imgsrc="images/6.jpg" alt="picture" />
76
+
<imgsrc="demo/6.jpg" alt="picture" />
77
77
<h2>News Heading</h2>
78
-
<p>A very short exerpt goes here... <ahref="#">more</a></p>
78
+
<p>Add a short exerpt here... <ahref="#">more</a></p>
79
79
</li>
80
80
81
81
<li>
82
-
<imgsrc="images/7.jpg" alt="picture" />
82
+
<imgsrc="demo/7.jpg" alt="picture" />
83
83
<h2>News Heading</h2>
84
-
<p>A very short exerpt goes here... <ahref="#">more</a></p>
84
+
<p>Add a short exerpt here... <ahref="#">more</a></p>
85
85
</li>
86
86
87
87
</ul><!-- end Slider #1 -->
@@ -92,33 +92,33 @@ <h2>News Heading</h2>
92
92
<divid="slider-two">
93
93
94
94
<div>
95
-
<imgsrc="images/5.jpg" alt="picture" />
95
+
<imgsrc="demo/5.jpg" alt="picture" />
96
96
<h2>News Heading - <span>Lisa</span></h2>
97
-
<p>A very short exerpt goes here... <ahref="http://flickr.com/photos/fensterbme/499006584/">more</a></p>
97
+
<p>Add a short exerpt here... <ahref="http://flickr.com/photos/fensterbme/499006584/">more</a></p>
98
98
</div>
99
99
100
100
<div>
101
-
<imgsrc="images/4.jpg" alt="picture" />
101
+
<imgsrc="demo/4.jpg" alt="picture" />
102
102
<h2>News Heading - <span>Monica</span></h2>
103
-
<p>A very short exerpt goes here... <ahref="http://flickr.com/photos/emikohime/294092478/">more</a></p>
103
+
<p>Add a short exerpt here... <ahref="http://flickr.com/photos/emikohime/294092478/">more</a></p>
104
104
</div>
105
105
106
106
<div>
107
-
<imgsrc="images/3.jpg" alt="picture" />
107
+
<imgsrc="demo/3.jpg" alt="picture" />
108
108
<h2>News Heading - <span>Lin</span></h2>
109
-
<p>A very short exerpt goes here... <ahref="http://flickr.com/photos/ruudvanleeuwen/468309897/">more</a></p>
109
+
<p>Add a short exerpt here... <ahref="http://flickr.com/photos/ruudvanleeuwen/468309897/">more</a></p>
110
110
</div>
111
111
112
112
<div>
113
-
<imgsrc="images/2.jpg" alt="picture" />
113
+
<imgsrc="demo/2.jpg" alt="picture" />
114
114
<h2>News Heading - <span>Shiela</span></h2>
115
-
<p>A very short exerpt goes here... <ahref="http://flickr.com/photos/joshuacraig/2698975899/">more</a></p>
115
+
<p>Add a short exerpt here... <ahref="http://flickr.com/photos/joshuacraig/2698975899/">more</a></p>
116
116
</div>
117
117
118
118
<div>
119
-
<imgsrc="images/1.jpg" alt="picture" />
119
+
<imgsrc="demo/1.jpg" alt="picture" />
120
120
<h2>News Heading - <span>Joanne</span></h2>
121
-
<p>A very short exerpt goes here... <ahref="http://flickr.com/photos/justbcuz/112479862/">more</a></p>
121
+
<p>Add a short exerpt here... <ahref="http://flickr.com/photos/justbcuz/112479862/">more</a></p>
0 commit comments