Skip to Content

JavaScript File

URL: https://allsoftlab.com/templates/BlogLive-3col/js/libs.js
HTTP Status: 200 OK
MIME Type: application/javascript
Last Modified: Fri, 03 Dec 2021 12:24:02 GMT
Download Time: Less than a second
Cookies: None
Size: 4 KB
HTTP Headers:  10 headers
Links In:  1 pages
Links Out:  0 links
Images:  0 images
CSS:  0 files
JavaScript:  0 files
OK Issues: No issues found

1

2$(document).ready(function(){

3

4 /* ====================== BUILDING ====================== */

5

6 $('body').append('<div class="overlay"></div><div class="mobile-menu" id="mobile-menu"></div><div class="mobile-menu-close"><span class="fal fa-times"></span></div><div id="scrolltop"><span class="fal fa-long-arrow-up"></span></div>');

7 $('.js-this-in-mobile-menu').each(function() {

8 $(this).clone().prependTo('#mobile-menu');

9 });

10

11 /* ====================== EVENTS ====================== */

12

13 $(document).on('click','.js-show-login',function(){

14 $('.overlay, .login').fadeIn(200);

15 $('body').addClass('modal-is-opened');

16 return false;

17 });

18

19 $(document).on('click','.pagination__btn-loader a',function(){

20 var urlNext = $(this).attr('href'), scrollNext = $(this).offset().top;

21 if (urlNext !== undefined) {

22 $.ajax({

23 url: urlNext,

24 beforeSend: function() { ShowLoading('<p class="bolder">Загрузка.</p> Пожалуйста, подождите.'); },

25 success: function(data) {

26 $('#pagination').remove(); $('#content-block').append($('#content-block', data).html());

27 window.history.pushState("", "", urlNext);

28 $('html, body').animate({scrollTop:scrollNext}, 800);

29 $('.pagination__btn-loader span').text('Больше нет новостей');

30 HideLoading(''); setTimeout(function() { $(window).lazyLoadXT(); }, 300);

31 },

32 error: function() { HideLoading(''); alert('что-то пошло не так'); }

33 });

34 };

35 return false;

36 });

37

38 $(".js-show-comments").click(function(){

39 $('.page__comments-form').fadeIn(0, function() {

40 $('html, body').animate({scrollTop:$('.page__comments-form').offset().top - 20}, 800);

...

</html>