Skip to content
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed problem with modal plugin firing a resize event
  • Loading branch information
Craga89 committed Jan 2, 2012
1 parent ceba974 commit 3defc6f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion dist/jquery.qtip.basic.js
Expand Up @@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Thu Dec 15 19:17:35 2011 +0000
* Date: Sat Dec 17 22:13:57 2011 +0000
*/

/*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true */
Expand Down
2 changes: 1 addition & 1 deletion dist/jquery.qtip.css
Expand Up @@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Thu Dec 15 19:17:35 2011 +0000
* Date: Sat Dec 17 22:13:57 2011 +0000
*/

/* Core qTip styles */
Expand Down
11 changes: 6 additions & 5 deletions dist/jquery.qtip.js
Expand Up @@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Thu Dec 15 19:17:35 2011 +0000
* Date: Sat Dec 17 22:13:57 2011 +0000
*/

/*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true */
Expand Down Expand Up @@ -2441,13 +2441,14 @@ function Modal(api)
.insertAfter( $(selector).last() );

// Update position on window resize or scroll
$(window).unbind(globalNamespace).bind('resize'+globalNamespace, function() {
function resize() {
overlay.css({
height: $(window).height(),
width: $(window).width()
width: $(window).width()
});
})
.triggerHandler('resize');
}
$(window).unbind(globalNamespace).bind('resize'+globalNamespace, resize);
resize(); // Fire it initially too

return overlay;
},
Expand Down
4 changes: 2 additions & 2 deletions dist/jquery.qtip.min.js

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions src/modal/modal.js
Expand Up @@ -127,13 +127,14 @@ function Modal(api)
.insertAfter( $(selector).last() );

// Update position on window resize or scroll
$(window).unbind(globalNamespace).bind('resize'+globalNamespace, function() {
function resize() {
overlay.css({
height: $(window).height(),
width: $(window).width()
width: $(window).width()
});
})
.triggerHandler('resize');
}
$(window).unbind(globalNamespace).bind('resize'+globalNamespace, resize);
resize(); // Fire it initially too

return overlay;
},
Expand Down

0 comments on commit 3defc6f

Please sign in to comment.