<div
htp-get="/hello.html"
htp-load="void"
htp-load-t="self"
htp-swap="append">
</div>
<?php
$last_id = $_GET['id'];
echo '<div class="h5 p" htp-load-end="' . $last_id+1 . '"> data ID: ' . $last_id+1 . '</div>';
?>
<style>
.load-php .loading-4 {
display: none;
}
.load-php[htp-on] .loading-4 {
display: flex;
}
.load-php[htp-done] .loading-4,
.load-php[htp-fail] .loading-4 {
display: none;
}
</style>
<div class="p load-php bg-s2">
<div htp-data="">
<div class="h5 p-x3" htp-load-end="1"> data ID: 1</div>
</div>
<div loader="icon" class="loading-4" label="loading"></div>
</div>
<div class="flex center">
<div class="button"
htp-get="/data.php"
htp-query='{"id":"$end"}'
htp-load="click"
htp-t=".load-php"
htp-swap="append"
htp-sync="true">
Load More data.php
</div>
</div>
// Example usage of $http.get() with options
var apiUrl = '/data';
// Example of query parameters to be sent in the GET request
var queryParams = {
category: 'electronics',
sortBy: 'price',
limit: 10,
};
// Define the options for the GET request
var options = {
headers: {
'Authorization': 'Bearer your_access_token', // Replace with your actual access token
'User-Agent': 'Custom User Agent', // You can set a custom User-Agent header
},
responseType: 'json', // Parse the response as JSON
status: 200, // Define the expected status code for successful responses
};
// Make the GET request using $http.get() with options
var request = $http.get(apiUrl, queryParams, options);
// Handling the response once the request is completed
request.done(function(responseData) {
// `responseData` will contain the parsed JSON data from the response
console.log('Response data:', responseData);
}).error(function() {
console.log('Error occurred during the request.');
});
// Progress tracking (if needed)
request.downloadProgress(function(progress) {
console.log('Download progress: ' + progress + '%');
});