Skip to content

Commit 01206df

Browse files
committed
prevent following side panel clicks, second attempt!
1 parent caa3c7b commit 01206df

4 files changed

+12
-5
lines changed

README.markdown

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010

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

13+
### Version 2.2.8 (2/22/2012)
14+
15+
* Clicking on side panels should not follow the link. A better fix for [issue #67](https://github.com/chriscoyier/MovingBoxes/issues/67).
16+
1317
### Version 2.2.7 (2/21/2012)
1418

1519
* Clicking on the side panels that are completely wrapped in a link should no longer open that link. Attempt to fix [issue #67](https://github.com/chriscoyier/MovingBoxes/issues/67).

js/jquery.movingboxes.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Moving Boxes v2.2.7
2+
* Moving Boxes v2.2.8
33
* by Chris Coyier
44
* http://css-tricks.com/moving-boxes/
55
*/
@@ -233,7 +233,10 @@
233233
var panels = base.$panels.eq(num - base.adj);
234234
if (o.reducedSize === 1) {
235235
panels.css({ width: base.curWidth }); // excluding fontsize change to prevent video flicker
236-
base.completed(num, flag);
236+
// time delay prevents click outer panel from following links - fixes issue #67
237+
setTimeout(function(){
238+
base.completed(num, flag);
239+
}, (time === 0) ? 0 : o.speed);
237240
} else {
238241
panels.animate({ width: base.curWidth, fontSize: '1em' }, (time === 0) ? 0 : o.speed, function(){
239242
// completed event trigger

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.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "MovingBoxes",
3-
"version": "2.2.7",
3+
"version": "2.2.8",
44
"title": "MovingBoxes",
55
"author": {
66
"name": "Chris Coyier",

0 commit comments

Comments
 (0)