PageSourceSearch

https://www.renewableenergyindiaexpo.com/uicomponents/js/script.js?var=1.5

js renewableenergyindiaexpo.com collected 2026-09-26 02:15:17 UTC 4,478 bytes, 116 lines download raw bytes

1
2
3
4
5
6
7// When the user scrolls the page, execute myFunction
8window.onscroll = function () { myFunction() };
9
10// Get the header
11var header = document.getElementById("siteheader");
12
13// Get the offset position of the navbar
14var sticky = header.offsetTop;
15
16// Add the sticky class to the header when you reach its scroll position. Remove "sticky" when you leave the scroll position
17function myFunction() {
18    if (window.pageYOffset > sticky) {
19        header.classList.add("sticky");
20    } else {
21        header.classList.remove("sticky");
22    }
23}
24
25
26
27$(window).scroll(function() {
28    displayBtnScrolltoTop();
29});
30
31// Scroll to target
32function scrollToTarget(D) {
33    if (D == 1) // Top of page
34    {
35        D = 0;
36    } else if (D == 2) // Bottom of page
37    {
38        D = $(document).height();
39    } else // Specific Bloc
40    {
41        D = $(D).offset().top;
42    }
43
44    $('html,body').animate({ scrollTop: D }, 'slow');
45}
46
47function scrollToTop() {
48    $('html,body').animate({ scrollTop: 0 }, 'slow');
49}
50
51// ScrollToTop button toggle
52function displayBtnScrolltoTop() {
53    if ($(window).scrollTop() > $(window).height() / 5) {
54        if (!$('.scrollToTop').hasClass('showScrollTop')) {
55            $('.scrollToTop').addClass('showScrollTop');
56        }
57    } else {
58        $('.scrollToTop').removeClass('showScrollTop');
59    }
60}
61
62//$(".homecard").mouseover(function () {
63//  //  debugger;
64//    $(this).find(".card-body").animate({ "top": "15%"}, 10);
65//});
66
67//$(".homecard").mouseleave(function () {
68//  //  debugger;
69//    $(this).find(".card-body").css({ "top": "auto"}, 10);
70//});
71
72
73
74
75// ============================ for countdown =======================
76// Set the date we're counting down to
77var countDownDate = new Date("Dec 10, 2020 10:00:00").getTime();
78
79// Update the count down every 1 second
80var x = setInterval(function() {
81
82    // Get today's date and time
83    var now = new Date().getTime();
84    
85    // Find the distance between now and the count down date
86    var distance = countDownDate - now;
87    
88    // Time calculations for days, hours, minutes and seconds
89    var days = Math.floor(distance / (1000 * 60 * 60 * 24));
90    var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
91    var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
92    var seconds = Math.floor((distance % (1000 * 60)) / 1000);
93    
94    // Output the result in an element with id="demo"
95   // document.getElementById("countdowninner").innerHTML = "<div class='countdownbox'><span>" + days + "</span><br />Days</div><div class='countdownbox'><span>" + hours + "</span><br />Hours</div><div class='countdownbox'><span>" + minutes + "</span><br />Minutes</div>";
96    // document.getElementById("countdown").innerHTML = "<div class='countdownbox'>" + days + "<br /><span>Days</span></div><div class='countdownbox'>" + hours + "<br /><span>Hours</span></div><div class='countdownbox'>" + minutes + "<br /><span>Minutes</span></div> <div class='countdownbox'>" + seconds + "<br /><span>Seconds</span></div>";
97   // document.getElementsByClassName("countdownview").innerHTML = "<div class='countdownbox'>" + days + "<br /><span>Days</span></div><div class='countdownbox'>" + hours + "<br /><span>Hours</span></div><div class='countdownbox'>" + minutes + "<br /><span>Minutes</span></div> <div class='countdownbox'>" + seconds + "<br /><span>Seconds</span></div>";
98    
99    //var list = document.getElementsByClassName("counterouterview")[0];
100   // list.getElementsByClassName("countdownview")[0].innerHTML = "<div class='countdownbox'>" + days + "<br /><span>Days</span></div><div class='countdownbox'>" + hours + "<br /><span>Hours</span></div><div class='countdownbox'>" + minutes + "<br /><span>Minutes</span></div> <div class='countdownbox'>" + seconds + "<br /><span>Seconds</span></div>";
101  //  $(".countdownview").html("<div class='countdownbox'>" + days + "<br /><span>Days</span></div><div class='countdownbox'>" + hours + "<br /><span>Hours</span></div><div class='countdownbox'>" + minutes + "<br /><span>Minutes</span></div> <div class='countdownbox'>" + seconds + "<br /><span>Seconds</span></div>");
102
103
104
105    // + seconds + "s "
106    // If the count down is over, write some text 
107    if (distance < 0) {
108        clearInterval(x);
109       // document.getElementById("countdown").innerHTML = "EXPIRED";
110    }
111}, 1000);
112
113
114
115
116

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.