Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added Neil Gast's bugfix for positioning

  • Loading branch information...
commit f657b281784ffb0faccbadd102213b2636d94f20 1 parent 6842deb
@jaz303 authored
Showing with 22 additions and 3 deletions.
  1. +20 −1 docs/tests.html
  2. +2 −2 src/javascripts/jquery.boxy.js
View
21 docs/tests.html
@@ -14,7 +14,13 @@
<link rel="stylesheet" href="stylesheets/boxy.css" type="text/css" />
<!-- END per project stuff -->
-
+ <script type='text/javascript'>
+ function lorem(opts) {
+ new Boxy("<div style='width: 350px'>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>", opts);
+ return false;
+ }
+ </script>
+
</head>
<body>
<div id='container'>
@@ -116,6 +122,19 @@
</li>
</ul>
+ <h2>Positioning</h2>
+ <ul>
+ <li>
+ <a href='#' onclick='return lorem({x: 200});'>200, DEFAULT</a>
+ </li>
+ <li>
+ <a href='#' onclick='return lorem({y: 200});'>DEFAULT, 200</a>
+ </li>
+ <li>
+ <a href='#' onclick='return lorem({center: false});'>DEFAULT, DEFAULT</a>
+ </li>
+ </ul>
+
</div>
<script type='text/javascript'>
View
4 src/javascripts/jquery.boxy.js
@@ -91,8 +91,8 @@ function Boxy(element, options) {
this.center();
} else {
this.moveTo(
- Boxy._u(this.options.x) ? this.options.x : Boxy.DEFAULT_X,
- Boxy._u(this.options.y) ? this.options.y : Boxy.DEFAULT_Y
+ Boxy._u(this.options.x) ? Boxy.DEFAULT_X : this.options.x,
+ Boxy._u(this.options.y) ? Boxy.DEFAULT_Y : this.options.y
);
}
Please sign in to comment.
Something went wrong with that request. Please try again.