File: /home/httpd/html/xdudes.com/templates/default_v3/template.favorites.php
<?php
//get current query string
$thisUrl = $_SERVER['REQUEST_SCHEME'] . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$queryString = parse_url($thisUrl, PHP_URL_QUERY);
$thisUrlNoQueryString = str_replace($queryString, "", $thisUrl);
?>
<div id='dataContent' >
<div class="loader"></div>
</div>
<script>
function getPlatform() {
var platform = ["Win32", "Android", "iOS"];
for (var i = 0; i < platform.length; i++) {
if (navigator.platform.indexOf(platform[i]) > -1) {
return platform[i];
}
}
}
var eventType = getPlatform() === 'iOS' ? 'touchend' : 'click';
$(document).ready(function () {
/*load current query string*/
$("#dataContent").load("<? echo $basehttp; ?>/core/ajax.loadFavorites.php", function () {
$("#dataContent").css('height', '100%');
setTimeout(function () {
$("#dataContent .img-col").css('opacity', '1');;
}, 300);
});
$('body').on(eventType, '#loadMore', function (e) {
e.preventDefault();
var thisPage = $(this).data("page");
$.get("<? echo $basehttp; ?>/core/ajax.loadFavorites.php?page=" + thisPage, function (thisData) {
$(".loadMoreContainer").remove();
$("#dataContent").append(thisData);
setTimeout(function () {
$("#dataContent .img-col").css('opacity', '1');;
}, 300);
});
});
});
</script>