1(function($) { 2 "use strict"; 3 4 $(document).ready(function() { 5 /* ------------------------------------------------------------- 6 Menu Dropdown 7 ------------------------------------------------------------- */ 8 if($(window).width() > 768) { 9 $("#header-sticky").headroom({ 10 "offset": 150, 11 "tolerance": 5, 12 "classes": { 13 "initial": "animated", 14 "pinned": "slideInDown", 15 "unpinned": "slideOutUp" 16 } 17 }); 18 19 $('#main-navbar .dropdown').on('mouseenter',function(){ 20 $(this).find('.dropdown-menu').first().stop(true, true).delay(300).slideDown(); 21 }); 22 23 $('#main-navbar .dropdown').on('mouseleave',function(){ 24 $(this).find('.dropdown-menu').first().stop(true, true).delay(100).slideUp(); 25 }); 26 } else { 27 $('ul.dropdown-menu [data-toggle=dropdown]').on('click', function(event) { 28 event.preventDefault(); 29 event.stopPropagation(); 30 $(this).parent().siblings().removeClass('open'); 31 $(this).parent().toggleClass('open'); 32 }); 33 } 34 35 /* ------------------------------------------------------------- 36 Variables 37 ------------------------------------------------------------- */ 38 var leftArrow = '<i class="fa fa-chevron-left"></i>'; 39 var rightArrow = '<i class="fa fa-chevron-right"></i>'; 40 41 /* ------------------------------------------------------------- 42 top-news Slider 43 ------------------------------------------------------------- */ 44 if ($('.top-news-slider').length){ 45 $('.top-news-slider').owlCarousel({ 46 nav:true, 47 items: 1 48 }); 49 } 50 51 /* ------------------------------------------------------------- 52 most read slider 53 ------------------------------------------------------------- */ 54 if ($('.most-read-slider').length){ 55 $('.most-read-slider').owlCarousel({ 56 nav:true, 57 items: 1, 58 navText: [leftArrow, rightArrow], 59 }); 60 } 61 /* ------------------------------------------------------------- 62 heighlights slider 63 ------------------------------------------------------------- */ 64 if ($('.heighlights-slider').length){ 65 $('.heighlights-slider').owlCarousel({ 66 nav:true, 67 items: 1, 68 navText: [leftArrow, rightArrow], 69 }); 70 } 71 72 /* ------------------------------------------------------------- 73 category slider 74 ------------------------------------------------------------- */ 75 if ($('.category-slider').length){ 76 $('.category-slider').owlCarousel({ 77 nav:true, 78 items: 1, 79 navText: [leftArrow, rightArrow], 80 }); 81 } 82 83 /* ------------------------------------------------------------- 84 video-news-slider 85 ------------------------------------------------------------- */ 86 if ($('.video-news-slider').length){ 87 $('.video-news-slider').owlCarousel({ 88 nav:true, 89 items: 1, 90 navText: [leftArrow, rightArrow], 91 }); 92 } 93 94 /* ------------------------------------------------------------- 95 header-trending 96 ------------------------------------------------------------- */ 97 if ($('.scoll-header .header-treanding-slider').length){ 98 $('.scoll-header .header-treanding-slider').owlCarousel({ 99 nav:true, 100 items: 1, 101 navText: [leftArrow, rightArrow], 102 }); 103 } 104 105 /* ------------------------------------------------------------- 106 header-trending 107 ------------------------------------------------------------- */ 108 if ( $('.header-close-wrap').length){ 109 $('.header-close-wrap .header-close-btn').on('click', function () { 110 $('.scoll-header').slideToggle("slow"); 111 112 if ($(this).text() == "CLOSE TOP SECTION") 113 $(this).text("OPEN TOP SECTION").addClass("header-close-btn-2") 114 else 115 $(this).text("CLOSE TOP SECTION").removeClass("header-close-btn-2").addClass("header-close-btn"); 116 }); 117 } 118 119 /* ------------------------------------------------------------- 120 push-menu-bar 121 ------------------------------------------------------------- */ 122 if ( $('.push-menu-btn').length){ 123 $('.push-menu-btn').on('click', function () { 124 $('.push-menu-bar').slideToggle("slow"); 125 $(this).toggleClass("actives"); 126 $('.push-menu-btn .push-buttom > i').toggleClass("fa-bars fa-times"); 127 }); 128 } 129 130 /* ------------------------------------------------------------- 131 search-menu-bar 132 ------------------------------------------------------------- */ 133 if ( $('.search-menu-btn').length){ 134 $('.search-menu-btn').on('click', function () { 135 $('.search-bar').slideToggle("slow"); 136 $(this).toggleClass("actives"); 137 $('.search-menu-btn .search-buttom > i').toggleClass("fa-seach fa-times"); 138 }); 139 } 140 141 /* ------------------------------------------------------------- 142 Push Menu & Search bar Close 143 ------------------------------------------------------------- */ 144 $('body').on('click', function(event) { 145 if (!$(event.target).closest('.search-menu-btn').length && !$(event.target).closest('.search-bar').length) { 146 $('.search-bar').slideUp("slow"); 147 $('.search-menu-btn .search-buttom > i').removeClass("fa-times").addClass("fa-seach"); 148 } 149 150 if (!$(event.target).closest('.push-menu-btn').length && !$(event.target).closest('.push-menu-bar').length) { 151 $('.push-menu-bar').slideUp("slow"); 152 $('.push-menu-btn .push-buttom > i').removeClass("fa-times").addClass("fa-bars"); 153 } 154 }); 155 156 157 /* ------------------------------------------------------------- 158 recent-scroll-pane 159 ------------------------------------------------------------- */ 160 if ( $('.recent-scroll-pane').length){ 161 $(".recent-scroll-pane").mCustomScrollbar({ 162 setWidth: false, 163 setHeight: 535, 164 }); 165 } 166 /* ------------------------------------------------------------- 167 editor-room-scroll 168 ------------------------------------------------------------- */ 169 if ( $('.editor-room-scroll').length){ 170 $(".editor-room-scroll").mCustomScrollbar({ 171 setWidth: false, 172 setHeight: 400, 173 }); 174 } 175 176 /* ------------------------------------------------------------- 177 most-read-scroll 178 ------------------------------------------------------------- */ 179 if ( $('.most-read-scroll').length){ 180 $(".most-read-scroll").mCustomScrollbar({ 181 setWidth: false, 182 setHeight: 590, 183 }); 184 } 185 186 /* ------------------------------------------------------------- 187 about-page-scroll 188 ------------------------------------------------------------- */ 189 if ( $('.terms-condition').length){ 190 $(".terms-condition").mCustomScrollbar({ 191 setWidth: false, 192 setHeight: 750, 193 }); 194 } 195 196 197 /* ------------------------------------------------------------- 198 trending-item-scroll 199 ------------------------------------------------------------- */ 200 if ( $('.trending-item-scroll').length){ 201 $(".trending-item-scroll").mCustomScrollbar({ 202 setWidth: false, 203 setHeight: 790, 204 }); 205 } 206 207 208 /* -------------------------------------------------------------
209 flex-slider 210 ------------------------------------------------------------- */ 211 if ( $('#carousel').length){ 212 $('#carousel').flexslider({ 213 animation: "slide", 214 controlNav: false, 215 animationLoop: false, 216 slideshow: false, 217 itemWidth: 160, 218 asNavFor: '#slider', 219 prevText: ['<i class="fa fa-chevron-left"></i>'], 220 nextText: ['<i class="fa fa-chevron-right"></i>'], 221 }); 222 } 223 224 if ( $('#slider').length){ 225 $('#slider').flexslider({ 226 animation: "slide", 227 controlNav: false, 228 directionNav: true, 229 sync: "#carousel", 230 prevText: ['<i class="fa fa-chevron-left"></i>'], 231 nextText: ['<i class="fa fa-chevron-right"></i>'], 232 }); 233 } 234 235 /* ------------------------------------------------------------- 236 Scroll To Top 237 ------------------------------------------------------------- */ 238 $.scrollUp({ 239 scrollText: '<i class="fa fa-arrow-up"></i>', 240 }); 241 242 /* ------------------------------------------------------------- 243 faqs-accordion 244 ------------------------------------------------------------- */ 245 if ( $('.faqs-accordion').length){ 246 $( ".faqs-accordion" ).accordion({ 247 collapsible: true, 248 heightStyle: "content", 249 icons: { "header": "fa fa-plus", "activeHeader": "fa fa-minus"} 250 }); 251 } 252 253 254 /* ------------------------------------------------------------- 255 Sticky Sidebar 256 ------------------------------------------------------------- */ 257 function newsboxer_sticky_sidebar(selector, offsetTop){ 258 if ( $(selector).length && $(window).width() > 767){ 259 $(selector).stick_in_parent({offset_top: offsetTop}); 260 $(selector) 261 .on('sticky_kit:bottom', function(e) { 262 $(this).parent().css('position', 'static'); 263 }) 264 .on('sticky_kit:unbottom', function(e) { 265 $(this).parent().css('position', 'relative'); 266 }) 267 } 268 } 269 270 if ( $('.single-post-leftbar').length){ 271 newsboxer_sticky_sidebar('.single-post-leftbar',20); 272 } 273 274 /* ------------------------------------------------------------- 275 Google Map 276 ------------------------------------------------------------- */ 277 var map; 278 window.initMap = function() { 279 if ( $('#map').length){ 280 map = new google.maps.Map(document.getElementById('map'), { 281 center: {lat: -34.397, lng: 150.644}, 282 zoom: 8 283 }); 284 } 285 } 286 287 }); 288})(jQuery);
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.