Skip to content

Commit

Permalink
Merge pull request sebarmeli#29 from crlcu/master
Browse files Browse the repository at this point in the history
Small bug fix
  • Loading branch information
sebarmeli committed Oct 11, 2012
2 parents 608f113 + d95007c commit d5717d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions jail.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @version 0.9.9
*
*/
(function ( name, definition ){
;(function ( name, definition ){
// jquery plugin pattern - AMD + CommonJS - by Addy Osmani (https://github.com/addyosmani/jquery-plugin-patterns/blob/master/amd+commonjs/pluginCore.js)
var theModule = definition(jQuery),
hasDefine = typeof define === 'function' && define.amd;
Expand Down Expand Up @@ -354,7 +354,7 @@
var parent = $img.parent(),
isVisible = true;

while ( parent.get(0).nodeName.toUpperCase() !== "BODY" ) {
while ( parent.length && parent.get(0).nodeName.toUpperCase() !== "BODY" ) {
// Consider the 'overflow' property
if ( parent.css("overflow") === "hidden" ) {
if (!_isInTheScreen(parent, $img, options.offset)) {
Expand Down
2 changes: 1 addition & 1 deletion jail.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d5717d1

Please sign in to comment.