PageSourceSearch

https://mayotte-streaming.com/templates/shaper_tixon/js/main.js

js mayotte-streaming.com collected 2026-10-01 23:55:50 UTC 7,384 bytes, 218 lines download raw bytes

1/**
2 * @package Helix3 Framework
3 * @author JoomShaper http://www.joomshaper.com
4 * @copyright Copyright (c) 2010 - 2015 JoomShaper
5 * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
6 */
7jQuery(function ($) {
8    //windowHeight
9    var windowHeight = $(window).height();
10    $(".error-page body, .sp-comingsoon body").css("height", windowHeight);
11
12    $(window).resize(function () {
13        "use strict",
14            $(".error-page body, .sp-comingsoon body").css(
15                "height",
16                windowHeight
17            );
18    });
19
20    var $body = $("body"),
21        $wrapper = $(".body-innerwrapper"),
22        $toggler = $("#offcanvas-toggler"),
23        $close = $(".close-offcanvas"),
24        $offCanvas = $(".offcanvas-menu");
25
26    $("#offcanvas-toggler").on("click", function (event) {
27        event.preventDefault();
28        $("body").addClass("offcanvas");
29    });
30
31    $(".close-offcanvas, .offcanvas-overlay").on("click", function (event) {
32        event.preventDefault();
33        $("body").removeClass("offcanvas");
34    });
35
36    var stopBubble = function (e) {
37        e.stopPropagation();
38        return true;
39    };
40
41    //Mega Menu
42    $(".sp-megamenu-wrapper")
43        .parent()
44        .parent()
45        .css("position", "static")
46        .parent()
47        .css("position", "relative");
48    $(".sp-menu-full").each(function () {
49        $(this).parent().addClass("menu-justify");
50    });
51
52    //Sticky Menu
53    $(document).ready(function () {
54        $("body.sticky-header").find("#sp-header").sticky({ topSpacing: 0 });
55    });
56
57    //Shopping cart
58    // var cartToggle = $('.vmCartModule .cart-container .cart-container-inner div.icon i.icon'),
59    // hikashop_cart = $('.vmCartModule .cart-container');
60
61    // cartToggle.on('click', function() {
62    //     hikashop_cart.toggleClass('active');
63    // });
64
65    //lowyer cta animation
66    var $delaytime = 150;
67    $(".lawyer-cta-wrap > div.sppb-addon").each(function (k, v) {
68        $(v)
69            .addClass("sppb-wow fadeInUp")
70            .attr("data-sppb-wow-delay", $delaytime + "ms");
71        $delaytime += 150;
72    });
73
74    //Tooltip
75    var tooltipTriggerList = [].slice.call(
76        document.querySelectorAll('[data-toggle="tooltip"]')
77    );
78    var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
79        return new bootstrap.Tooltip(tooltipTriggerEl);
80    });
81
82    $(document).on("click", ".sp-rating .star", function (event) {
83        event.preventDefault();
84
85        var data = {
86            action: "voting",
87            user_rating: $(this).data("number"),
88            id: $(this).closest(".post_rating").attr("id"),
89        };
90
91        var request = {
92            option: "com_ajax",
93            plugin: "helix3",
94            data: data,
95            format: "json",
96        };
97
98        $.ajax({
99            type: "POST",
100            data: request,
101            beforeSend: function () {
102                $(".post_rating .ajax-loader").show();
103            },
104            success: function (response) {
105                var data = $.parseJSON(response.data);
106
107                $(".post_rating .ajax-loader").hide();
108
109                if (data.status == "invalid") {
110                    $(".post_rating .voting-result")
111                        .text("You have already rated this entry!")
112                        .fadeIn("fast");
113                } else if (data.status == "false") {
114                    $(".post_rating .voting-result")
115                        .text("Somethings wrong here, try again!")
116                        .fadeIn("fast");
117                } else if (data.status == "true") {
118                    var rate = data.action;
119                    $(".voting-symbol")
120                        .find(".star")
121                        .each(function (i) {
122                            if (i < rate) {
123                                $(".star")
124                                    .eq(-(i + 1))
125                                    .addClass("active");
126                            }
127                        });
128
129                    $(".post_rating .voting-result")
130                        .text("Thank You!")
131                        .fadeIn("fast");
132                }
133            },
134            error: function () {
135                $(".post_rating .ajax-loader").hide();
136                $(".post_rating .voting-result")
137                    .text("Failed to rate, try again!")
138                    .fadeIn("fast");
139            },
140        });
141    });
142
143    //For react template
144    var observer = new MutationObserver(function (mutations) {
145        mutations.forEach(function (mutation) {
146            var newNodes = mutation.addedNodes;
147            if (newNodes !== null) {
148                var $nodes = $(newNodes);
149
150                $nodes.each(function () {
151                    var $node = $(this);
152                    $node.find("#slide-fullwidth").each(function () {
153                        var $slideFullwidth = $("#slide-fullwidth");
154                        var $autoplay = $slideFullwidth.attr(
155                            "data-sppb-slide-ride"
156                        );
157                        if ($autoplay == "true") {
158                            var $autoplay = true;
159                        } else {
160                            var $autoplay = false;
161                        }
162
163                        var $controllers = $slideFullwidth.attr(
164                            "data-sppb-slidefull-controllers"
165                        );
166                        if ($controllers == "true") {
167                            var $controllers = true;
168                        } else {
169                            var $controllers = false;
170                        }
171
172                        $slideFullwidth.owlCarousel({
173                            margin: 0,
174                            loop: true,
175                            video: true,
176                            autoplay: $autoplay,
177                            animateIn: "fadeIn",
178                            animateOut: "fadeOut",
179                            autoplayHoverPause: true,
180                            autoplaySpeed: 1500,
181                            responsive: {
182                                0: {
183                                    items: 1,
184                                },
185                                600: {
186                                    items: 1,
187                                },
188                                1000: {
189                                    items: 1,
190                                },
191                            },
192                            dots: $controllers,
193                        });
194
195                        $(".sppbSlidePrev").click(function () {
196                            $slideFullwidth.trigger("prev.owl.carousel", [400]);
197                        });
198
199                        $(".sppbSlideNext").click(function () {
200                            $slideFullwidth.trigger("next.owl.carousel", [400]);
201                        });
202
203                        $("#slide-fullwidth .owl-controls").addClass(
204                            "container"
205                        );
206                    });
207                });
208            }
209        });
210    });
211
212    var config = {
213        childList: true,
214        subtree: true,
215    };
216    // Pass in the target node, as well as the observer options
217    observer.observe(document.body, config);
218});

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.