1(function ($) { 2 "use strict"; 3 var inews = { 4 initialize: function () { 5 this.pageLoader(); 6 this.toTop(); 7 this.carousel(); 8 this.stickySidebar(); 9 this.youtubeVideo(); 10 this.tab(); 11 this.tabPanel(); 12 this.bgImage(); 13 // this.skyicon(); 14 this.progresber(); 15 }, 16// -------------------------------------------------------------------------- // 17// Page loader 18// -------------------------------------------------------------------------- // 19 pageLoader: function () { 20 $(".se-pre-con").fadeOut("slow"); 21 }, 22// -------------------------------------------------------------------------- // 23// Back to top 24// -------------------------------------------------------------------------- // 25 toTop: function () { 26 $('body').append('<div id="toTop" class="btn back-top"><span class="ti-arrow-up"></span></div>'); 27 $(window).on("scroll", function () { 28 if ($(this).scrollTop() !== 0) { 29 $('#toTop').fadeIn(); 30 } else { 31 $('#toTop').fadeOut(); 32 } 33 }); 34 $('#toTop').on("click", function () { 35 $("html, body").animate({ 36 scrollTop: 0 37 } 38 , 600); 39 return false; 40 }); 41 }, 42// -------------------------------------------------------------------------- // 43//owlCarousel 44// -------------------------------------------------------------------------- // 45 carousel: function () { 46 //NewsTicker 47 $('.news-ticker').owlCarousel({ 48 loop: true, 49 items: 1, 50 dots: false, 51 animateOut: 'slideOutDown', 52 animateIn: 'flipInX', 53 autoplay: true, 54 autoplayTimeout: 4000, //Set AutoPlay to 4 seconds 55 autoplayHoverPause: true, 56 nav: true, 57 navText: [ 58 "<i class='ti-angle-left'></i>", 59 "<i class='ti-angle-right'></i>" 60 ] 61 }); 62 //NewsTicker rtl 63 $('.news-ticker-rtl').owlCarousel({ 64 rtl: true, 65 loop: true, 66 items: 1, 67 dots: false, 68 animateOut: 'slideOutDown', 69 animateIn: 'flipInX', 70 autoplay: true, 71 autoplayTimeout: 5000, //Set AutoPlay to 4 seconds 72 autoplayHoverPause: true, 73 nav: true, 74 navText: [ 75 "<i class='ti-angle-left'></i>", 76 "<i class='ti-angle-right'></i>" 77 ] 78 }); 79 80 81 //slider 82 $('#owl-slider').owlCarousel({ 83 loop: true, 84 items: 1, 85 dots: false, 86 animateOut: 'fadeOut', 87 animateIn: 'fadeIn', 88 autoplay: true, 89 autoplayTimeout: 5000, //Set AutoPlay to 4 seconds 90 autoplayHoverPause: true, 91 nav: true, 92 navText: [ 93 "<i class='ti-angle-left'></i>", 94 "<i class='ti-angle-right'></i>" 95 ] 96 }); 97 //slider rtl 98 $('#owl-slider-rtl').owlCarousel({ 99 rtl: true, 100 loop: true, 101 items: 1, 102 dots: true, 103 animateOut: 'fadeOut', 104 animateIn: 'fadeIn', 105 autoplay: true, 106 autoplayTimeout: 4000, //Set AutoPlay to 4 seconds 107 autoplayHoverPause: true, 108 nav: true, 109 navText: [ 110 "<i class='ti-angle-left'></i>", 111 "<i class='ti-angle-right'></i>" 112 ] 113 }); 114 //Featured carousel 115 $('#featured-owl').owlCarousel({ 116 loop: true, 117 dots: false, 118 lazyLoad: true, 119 autoplay: true, 120 autoplayTimeout: 4000, //Set AutoPlay to 4 seconds 121 autoplayHoverPause: true, 122 nav: true, 123 navText: [ 124 "<i class='ti-angle-left'></i>", 125 "<i class='ti-angle-right'></i>" 126 ], 127 responsive: { 128 0: { 129 items: 1 130 } 131 , 479: { 132 items: 2 133 } 134 , 768: { 135 items: 2 136 } 137 , 980: { 138 items: 3 139 } 140 , 1199: { 141 items: 4 142 } 143 } 144 }); 145 //Featured carousel
146 $('#fashion').owlCarousel({ 147 loop: true, 148 dots: false, 149 lazyLoad: true, 150 autoplay: true, 151 autoplayTimeout: 4000, //Set AutoPlay to 4 seconds 152 autoplayHoverPause: true, 153 nav: true, 154 navText: [ 155 "<i class='ti-angle-left'></i>", 156 "<i class='ti-angle-right'></i>" 157 ], 158 responsive: { 159 0: { 160 items: 1 161 } 162 , 479: { 163 items: 2 164 } 165 , 768: { 166 items: 2 167 } 168 , 980: { 169 items: 3 170 } 171 , 1199: { 172 items: 4 173 } 174 } 175 }); 176 //Featured carousel 177 $('#interview').owlCarousel({ 178 loop: true, 179 dots: false, 180 lazyLoad: true, 181 autoplay: true, 182 autoplayTimeout: 4000, //Set AutoPlay to 4 seconds 183 autoplayHoverPause: true, 184 nav: true, 185 navText: [ 186 "<i class='ti-angle-left'></i>", 187 "<i class='ti-angle-right'></i>" 188 ], 189 responsive: { 190 0: { 191 items: 1 192 } 193 , 479: { 194 items: 2 195 } 196 , 768: { 197 items: 2 198 } 199 , 980: { 200 items: 3 201 } 202 , 1199: { 203 items: 4 204 } 205 } 206 }); 207 //Featured carousel 208 $('#events').owlCarousel({ 209 loop: true, 210 dots: false, 211 lazyLoad: true, 212 autoplay: true, 213 autoplayTimeout: 4000, //Set AutoPlay to 4 seconds 214 autoplayHoverPause: true, 215 nav: true, 216 navText: [ 217 "<i class='ti-angle-left'></i>", 218 "<i class='ti-angle-right'></i>" 219 ], 220 responsive: { 221 0: { 222 items: 1 223 } 224 , 479: { 225 items: 2 226 } 227 , 768: { 228 items: 2 229 } 230 , 980: { 231 items: 3 232 } 233 , 1199: { 234 items: 4 235 } 236 } 237 }); 238 //Featured carousel 239 $('#latest-publication').owlCarousel({ 240 loop: true, 241 dots: false, 242 lazyLoad: true, 243 autoplay: true, 244 autoplayTimeout: 4000, //Set AutoPlay to 4 seconds 245 autoplayHoverPause: true, 246 nav: true, 247 navText: [ 248 "<i class='ti-angle-left'></i>", 249 "<i class='ti-angle-right'></i>" 250 ], 251 responsive: { 252 0: { 253 items: 1 254 } 255 , 600: { 256 items: 4 257 } 258 } 259 }); 260 //Featured carousel rtl 261 $('#featured-owl-rtl').owlCarousel({ 262 rtl: true, 263 loop: true, 264 nav: false, 265 dots: false, 266 lazyLoad: true, 267 autoplay: true, 268 autoplayTimeout: 4000, //Set AutoPlay to 4 seconds 269 autoplayHoverPause: true, 270 responsive: { 271 0: { 272 items: 1 273 } 274 , 479: { 275 items: 2 276 } 277 , 768: { 278 items: 2 279 } 280 , 980: { 281 items: 3 282 } 283 , 1199: { 284 items: 4 285 } 286 } 287 }); 288 //Post carousel
289 $('.post-slider').owlCarousel({ 290 items: 1, 291 loop: true, 292 dots: false, 293 // animateOut: 'fadeOut', 294 // animateIn: 'fadeIn', 295 nav: true, 296 autoplay: true, 297 autoplayTimeout: 30000, 298 navText: [ 299 "<i class='fa fa-angle-left'></i>", 300 "<i class='fa fa-angle-right'></i>" 301 ] 302 }); 303 //Post carousel rtl 304 $('.post-slider-rtl').owlCarousel({ 305 rtl: true, 306 loop: true, 307 dots: false, 308 animateOut: 'fadeOut', 309 animateIn: 'fadeIn', 310 items: 1, 311 nav: true, 312 navText: [ 313 "<i class='ti-angle-left'></i>", 314 "<i class='ti-angle-right'></i>" 315 ] 316 }); 317 318 //Daily update news carousel 319 $('.daily-update-news').owlCarousel({ 320 loop: true, 321 dots: false, 322 items: 1, 323 nav: false, 324 autoplay: true, 325 autoplayTimeout: 30000, 326 }); 327 }, 328// -------------------------------------------------------------------------- // 329// Sticky Sidebar 330// -------------------------------------------------------------------------- // 331 stickySidebar: function () { 332 $('.main-content, .rightSidebar, .leftSidebar').theiaStickySidebar({ 333 additionalMarginTop: 30 334 }); 335 }, 336// -------------------------------------------------------------------------- // 337// Youtube video 338// -------------------------------------------------------------------------- // 339 youtubeVideo: function () { 340 // This key only works for this demo on newspaper 341 // You must create your own at: 342 // https://developers.google.com/youtube/v3/getting-started 343 window.api_key='AIzaSyAroKpLQWTON6y34m5VqGcLCPtOmfLBqh4'; 344 // Start two players by ID, with default settings 345 // $('#rypp-demo-1').rypp(api_key, { 346 // update_title_desc: true, // Default false 347 // autoplay: false, autonext: false, loop: false, mute: false, debug: false 348 // }); 349 }, 350// -------------------------------------------------------------------------- // 351// Tab 352// -------------------------------------------------------------------------- // 353 tab: function () { 354 // $(".weather-week>div.list-group>a").click(function (e) { //previous code 355 $(".weather-week>div.list-group>a").on("click", function (e) { //added by zakir 356 e.preventDefault(); 357 $(this).siblings('a.active').removeClass("active"); 358 $(this).addClass("active"); 359 var index = $(this).index(); 360 $("div.bhoechie-tab>div.weather-temp-wrap").removeClass("active"); 361 $("div.bhoechie-tab>div.weather-temp-wrap").eq(index).addClass("active"); 362 }); 363 }, 364// -------------------------------------------------------------------------- // 365// Tab panel 366// -------------------------------------------------------------------------- // 367 tabPanel: function () { 368 $('.collapse.in').prev('.panel-heading').addClass('active'); 369 $('#accordion').on('show.bs.collapse', function (a) { 370 $(a.target).prev('.panel-heading').addClass('active'); 371 } 372 ).on('hide.bs.collapse', function (a) { 373 $(a.target).prev('.panel-heading').removeClass('active'); 374 } 375 ); 376 }, 377// -------------------------------------------------------------------------- // 378// Tab panel 379// -------------------------------------------------------------------------- // 380 bgImage: function () { 381 //Background image 382 $(".bg-img").css('backgroundImage', function () { 383 var bg = ('url(' + $(this).data("image-src") + ')'); 384 return bg; 385 }); 386 }, 387// -------------------------------------------------------------------------- // 388// Tab panel 389// -------------------------------------------------------------------------- // 390 skyicon: function () { 391 //Skyicon 392 var icons = new Skycons({"color": "#fff"}), 393 list = [ 394 "clear-day", "clear-night", "partly-cloudy-day", 395 "partly-cloudy-night", "cloudy", "rain", "sleet", "snow", "wind", 396 "fog" 397 ], 398 i; 399 400 for (i = list.length; i--; ) 401 icons.set(list[i], list[i]); 402 403 icons.play(); 404 }, 405// -------------------------------------------------------------------------- // 406// Progresber 407// -------------------------------------------------------------------------- // 408 progresber: function () { 409 var el = document.getElementsByClassName('progressber'), l = el.length; 410 for (var i = 0; 411 i < l; 412 i++) { 413 var options = { 414 percent: el[i].getAttribute('data-percent'), size: el[i].getAttribute('data-size') || 60, lineWidth: el[i].getAttribute('data-line') || 4 415 } 416 ; 417 var canvas = document.createElement('canvas'); 418 var span = document.createElement('span'); 419 span.textContent = options.percent + '%'; 420 if (typeof (G_vmlCanvasManager) !== 'undefined') { 421 G_vmlCanvasManager.initElement(canvas); 422 } 423 var ctx = canvas.getContext('2d'); 424 canvas.width = canvas.height = options.size; 425 el[i].appendChild(span); 426 el[i].appendChild(canvas); 427 ctx.translate(options.size / 2, options.size / 2); // change center 428 var radius = (options.size - options.lineWidth) / 2; 429 var drawCircle = function (color, lineWidth, percent) { 430 percent = Math.min(Math.max(0, percent || 1), 1); 431 ctx.beginPath(); 432 ctx.arc(0, 0, radius, 0, Math.PI * 2 * percent, false); 433 ctx.strokeStyle = color; 434 ctx.lineCap = 'round'; 435 ctx.lineWidth = lineWidth; 436 ctx.stroke(); 437 } 438 ; 439 drawCircle('transparent', options.lineWidth, 100 / 100); 440 drawCircle('#0c4da2', options.lineWidth, options.percent / 100); 441 } 442 } 443 }; 444 // Initialize 445 $(document).ready(function () { 446 inews.initialize(); 447 $("#datepicker").datepicker(); 448 }); 449 // Reset on resize 450 $(window).on("load", function () { 451 inews.pageLoader(); 452 }); 453}(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.