let TotalPages = 10, pages = [], i=0, href="https://site/ua-search/page-2?search=футболка";
while (++i <= TotalPages)
pages.push(href.substring(0,href.indexOf("page-")+5) + i + href.substring(href.indexOf("?")));
let TotalPages = 11, pages = [], i=0, href="https://site/ua-search/page-2?search=футболка";
while (++i <= TotalPages)
pages.push(href.replace(/\/page-\d+\?/, "/page-"+i+"?"));
let href = "https://site/ua-search/page-4?search=футболка";
console.log(href.substring(href.indexOf("page-")+5, href.indexOf("?")));
console.log(href.match(/page-(\d+)/)[1]);
$products_5 = array_slice($products, 0, 5);
$products_more = array_slice($products, 5);
{
html: 'Your html markup',
last: false, // or true
}
$.ajax({
url:'index.php?route=module/loadMore',
type:"GET",
dataType: 'json',
data: {
module_id: '<?php echo $module_id; ?>',
page : 'id_<?php echo $module_id; ?>',
}
success:function (response) {
$('#app_<?php echo $module_id; ?>').append($(response.html).find('.gdfgdf'));
if (response.last) {
$('#more_button').hide();
}
}
});
clientWidth
$(document).ready(function () {
$('#menu .dropdown >.dropdown-menu').on(
{
mouseenter: function () {
$("#menu .dropdown .dropdown-toggle").after('<div id="menu_background"></div>');
},
mouseout: function () {
$("#menu_background").remove();
}
}
);
});
<?php if ($counter % 4 == 0) { ?>
<div class="clearfix"></div>
<?php } ?>
<?php } ?>