<button type="submit" onclick="scrollTo('page-title-not-auth')"></button>
............
............
<div id="page-title-not-auth"></div>
function scrollTo(id) {
location.href = "#" + id;
}
$(function() {
$('.emb').each(function() {
$(this).on('click', function() {
var block = $(this).next('.meta-data'),
pinbox = $(this).parents('.loop');
pinbox.toggleClass('loop_active');
if (pinbox.hasClass('loop_active')) {
block.slideDown(100);
$(document).on('click', function(event) {
if ($(event.target).closest(pinbox).length) {
if (!$('.modal-backdrop').length)
$('body').append('<div class="modal-backdrop fade in"></div>');
return;
}
block.hide(100);
pinbox.removeClass('loop_active');
$('.modal-backdrop').remove();
event.stopPropagation();
});
}
});
}
$(function() {
$('.emb').each(function() {
$(this).on('click', function() {
var block = $(this).next('.meta-data'),
pinbox = $(this).parents('.loop');
pinbox.toggleClass('loop_active');
if (pinbox.hasClass('loop_active')) {
block.slideDown(100);
$(document).on('click', function(event) {
if ($(event.target).closest(pinbox).length) {
if (!$('.modal-backdrop').length)
$('body').append('<div class="modal-backdrop fade in"></div>');
return;
}
block.hide(100);
pinbox.removeClass('loop_active');
$('.modal-backdrop').remove();
event.stopPropagation();
});
}
});
});
});
var total = <?php echo $wp_query->max_num_pages; ?>;
var total = 10;
<script src="https://unpkg.com/imagesloaded@4/imagesloaded.pkgd.min.js">
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.js"></script>