31 lines
946 B
JavaScript
31 lines
946 B
JavaScript
$(document).ready(function () {
|
|
$(window).load(function () {
|
|
GetResources();
|
|
});
|
|
$(window).scroll(function () {
|
|
if (($(window).scrollTop() + 1) >= ($(document).height() - $(window).height())) {
|
|
GetResources();
|
|
};
|
|
});
|
|
});
|
|
|
|
var oldResourcesDivHeight = $('#resourcesDiv').height();
|
|
|
|
function GetResources() {
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: '/FileSystem/ShowAdditionalContent',
|
|
data: '',
|
|
dataType: "html",
|
|
success: function (result) {
|
|
var domElement = $(result);
|
|
$('#resourcesDiv').append(domElement);
|
|
if ($(document).height() == $(window).height() && oldResourcesDivHeight != $('#resourcesDiv').height()) {
|
|
GetResources();
|
|
oldResourcesDivHeight = $('#resourcesDiv').height();
|
|
};
|
|
|
|
recalculateResourseHeight();
|
|
}
|
|
});
|
|
};
|