PageSourceSearch

https://lariatnews.com/wp-content/themes/hotnews/js/customscript.js?ver=7.1.2

js lariatnews.com collected 2026-10-02 11:08:55 UTC 4,358 bytes, 140 lines download raw bytes

1var $ = jQuery.noConflict();
2jQuery.fn.exists = function(callback) {
3  var args = [].slice.call(arguments, 1);
4  if (this.length) {
5    callback.call(this, args);
6  }
7  return this;
8};
9
10/*----------------------------------------------------
11/* Scroll to top
12/*--------------------------------------------------*/
13jQuery(document).ready(function() {
14    //START -- MOVE-TO-TOP ARROW
15	//move-to-top arrow
16	jQuery("body").prepend("<div id='move-to-top' class='animate '><i class='icon-chevron-up'></i></div>");
17	var scrollDes = 'html,body';  
18	/*Opera does a strange thing if we use 'html' and 'body' together so my solution is to do the UA sniffing thing*/
19	if(navigator.userAgent.match(/opera/i)){
20		scrollDes = 'html';
21	}
22	//show ,hide
23	jQuery(window).scroll(function () {
24		if (jQuery(this).scrollTop() > 160) {
25			jQuery('#move-to-top').addClass('filling').removeClass('hiding');
26		} else {
27			jQuery('#move-to-top').removeClass('filling').addClass('hiding');
28		}
29	});
30	// scroll to top when click 
31	jQuery('#move-to-top').click(function () {
32		jQuery(scrollDes).animate({ 
33			scrollTop: 0
34		},{
35			duration :500
36		});
37	});
38	//END -- MOVE-TO-TOP ARROW
39});
40
41/*----------------------------------------------------
42/* Responsive Navigation
43/*--------------------------------------------------*/
44jQuery(document).ready(function($){
45    var $top_menu = $('.top-navigation');
46    var $secondary_menu = $('.secondary-navigation');
47    var $first_menu = '';
48    var $second_menu = '';
49
50    if ($top_menu.length == 0 && $secondary_menu.length == 0) {
51        return; // no need for further processing
52    } else {
53        if ($top_menu.length) {
54            $first_menu = $top_menu;
55            $second_menu = $secondary_menu;
56        } else {
57            $first_menu = $secondary_menu;
58        }
59    }
60    
61    var menu_wrapper = $first_menu
62    .clone().attr('class', 'mobile-menu')
63    .wrap('<div id="mobile-menu-wrapper"></div>').parent().hide()
64    .appendTo('body');
65    
66    // add items from the other menu
67    if ($second_menu.length) {
68        $second_menu.find('li').clone().prependTo('.mobile-menu ul');
69    }
70    
71    $('.toggle-mobile-menu').click(function(e) {
72        e.preventDefault(); e.stopPropagation();
73        $('#mobile-menu-wrapper').show(); // only required once
74        $('body').toggleClass('mobile-menu-active');
75    });
76    
77    // close menu when click/tap on content
78    $('#mobile-menu-wrapper').click(function(e) {
79        e.stopPropagation();
80    });
81    $(document).click(function() {
82        if ($('body').hasClass('mobile-menu-active')) {
83            $('body').removeClass('mobile-menu-active');
84        }
85    });
86});
87
88
89/*----------------------------------------------------
90/*  Dropdown menu
91/* ------------------------------------------------- */
92jQuery(document).ready(function() { 
93	$('#navigation ul.sub-menu').hide(); // hides the submenus in mobile menu too
94	$('#navigation li').hover( 
95		function() {
96			$(this).children('ul.sub-menu').slideDown('fast');
97		}, 
98		function() {
99			$(this).children('ul.sub-menu').hide();
100		}
101	);
102});
103
104/*----------------------------------------------------
105/* Social button scripts
106/*---------------------------------------------------*/
107jQuery(document).ready(function(){
108	jQuery.fn.exists = function(callback) {
109	  var args = [].slice.call(arguments, 1);
110	  if (this.length) {
111		callback.call(this, args);
112	  }
113	  return this;
114	};
115	(function(d, s) {
116	  var js, fjs = d.getElementsByTagName(s)[0], load = function(url, id) {
117		if (d.getElementById(id)) {return;}
118		js = d.createElement(s); js.src = url; js.id = id;
119		fjs.parentNode.insertBefore(js, fjs);
120	  };
121	jQuery('span.facebookbtn, .facebook_like').exists(function() {
122	  load('//connect.facebook.net/en_US/all.js#xfbml=1', 'fbjssdk');
123	});
124	jQuery('span.gplusbtn').exists(function() {
125	  load('https://apis.google.com/js/plusone.js', 'gplus1js');
126	});
127	jQuery('span.twitterbtn').exists(function() {
128	  load('//platform.twitter.com/widgets.js', 'tweetjs');
129	});
130	jQuery('span.linkedinbtn').exists(function() {
131	  load('//platform.linkedin.com/in.js', 'linkedinjs');
132	});
133	jQuery('span.pinbtn').exists(function() {
134	  load('//assets.pinterest.com/js/pinit.js', 'pinterestjs');
135	});
136	jQuery('span.stumblebtn').exists(function() {
137	  load('//platform.stumbleupon.com/1/widgets.js', 'stumbleuponjs');
138	});
139	}(document, 'script'));
140});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.