Skip to content

Commit

Permalink
Fixed add support for multiple headers and footers for jQm
Browse files Browse the repository at this point in the history
  • Loading branch information
jerone committed Oct 11, 2012
1 parent cdf06b0 commit 3598ef8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/jquery.scrollz.js
Original file line number Diff line number Diff line change
Expand Up @@ -757,8 +757,14 @@
$(window).resize(function() {

// Compute content heights (between header and footer, if any) visible and full
var headerHeight = $(".ui-page-active div.ui-header").outerHeight();
var footerHeight = $(".ui-page-active div.ui-footer").outerHeight();
var headerHeight = 0;
$(".ui-page-active div.ui-header").each(function () {
headerHeight += $(this).outerHeight();
});
var footerHeight = 0;
$(".ui-page-active div.ui-footer").each(function () {
footerHeight += $(this).outerHeight();
});
var visibleContentHeight = (window.innerHeight ? window.innerHeight : $(window).height()) - (headerHeight ? headerHeight : 0) - (footerHeight ? footerHeight : 0);
$(":jqmData(scrollz='simple'), :jqmData(scrollz='pull')").scrollz('height', visibleContentHeight);
});
Expand Down

0 comments on commit 3598ef8

Please sign in to comment.