PageSourceSearch

https://pharmamex.com.mx/templates/default/js/custom.js

js pharmamex.com.mx collected 2026-10-04 02:39:57 UTC 5,724 bytes, 135 lines download raw bytes

1/****************************/
2if ($(window).width() <= '768') {
3    $('.section_top_footer .h3, .contacts_info_footer .h3').click('click', function (event) {
4        event.preventDefault();
5        var arrow = $(this).parent().find('.toggle-xs');
6        var h3 = $(this);
7
8        $(arrow.attr('data-target')).slideToggle(); // show or hide block
9
10        if (arrow.hasClass('open')) {
11            arrow.removeClass('open');
12            h3.removeClass('openh3');
13        } else {
14            arrow.addClass('open');
15            h3.addClass('openh3');
16        }
17    });
18}
19
20//open mobile_menu
21$('.btn-mobile_menu').click(function (e) {
22    $('.btn-mobile_menu').toggleClass('active_btn');
23    $('.mobile_menu').toggleClass('active_menu');
24    $('#search-form-fader').toggleClass('search-form-fader-open');
25    $('body').toggleClass('modal-open');
26
27});
28//close search, mobile_menu
29$('#search-form-fader').click(function (e) {
30    $('#search-form-fader').removeClass('search-form-fader-open');
31    $('.btn-mobile_menu').removeClass('active_btn');
32    $('.mobile_menu').removeClass('active_menu');
33    $('body').removeClass('modal-open');
34    closeSearchForm();
35});
36
37//open mobile catalogs
38$('.button-main-cursor').click(function (e) {
39    $(this).parent('div').toggleClass('open_menu').find('.mob_cats_wrapper, .menu_information, .menu_manuf').slideToggle();
40});
41
42function openSearchForm() {
43    if ($('.mobile_header .main_search_form').hasClass('search-form-open')) {
44        closeSearchForm();
45    } else {
46        $('.mobile_header .main_search_form').addClass('search-form-open');
47        $('.mobile_header #searchpr1').addClass('search-form-input-open').select();
48        $('.mobile_header #search-form-button1').addClass('search-form-button-open');
49        $('.mobile_header #search-form-button-close1').addClass('search-form-button-close-open');
50        $('.search-form-fader').toggleClass('search-form-fader-open');
51        $('body').addClass('modal-open');
52
53        if (!$('#search-form-fader').hasClass('search-form-fader-open')) {
54            $('#search-form-fader').addClass('search-form-fader-open');
55        }
56    }
57}
58
59function closeSearchForm() {
60    $('.mobile_header .main_search_form').removeClass('search-form-open');
61    $('.mobile_header #searchpr1').removeClass('search-form-input-open');
62    $('.mobile_header #search-form-button1').removeClass('search-form-button-open');
63    $('.mobile_header #search-form-button-close1').removeClass('search-form-button-close-open');
64    if ($('.mobile_menu.active_menu').length === 0) {
65        $('body').removeClass('modal-open');
66        $('#search-form-fader').removeClass('search-form-fader-open');
67    }
68}
69/*
70$(document).ready(() => {
71    if($('#last_viewed').length > 0) {
72        $('#last_viewed').owlCarousel({
73            loop: true,
74            nav: true,
75            navText: ["<svg role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\"><path d=\"M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z\"></path></svg>", "<svg role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\"><path d=\"M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z\"></path></svg>"],
76            responsive: {
77                0: {
78                    items: 2
79                },
80                768: {
81                    items: 4
82                },
83                992: {
84                    items: 5,
85                },
86                1200: {
87                    items: 6,
88                },
89            },
90            // onInitialized: fixOwl,
91            // onRefreshed: fixOwl
92        });
93        $("#last_viewed").trigger('refresh.owl.carousel');
94    }
95    if($('#drugie').length > 0) {
96        $('#drugie').owlCarousel({
97            loop: true,
98            nav: true,
99            navText: ["<svg role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\"><path d=\"M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z\"></path></svg>", "<svg role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\"><path d=\"M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522
99-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z\"></path></svg>"],
100            responsive: {
101                0: {
102                    items: 2
103                },
104                768: {
105                    items: 4
106                },
107                992: {
108                    items: 5,
109                },
110                1200: {
111                    items: 6,
112                },
113            },
114        });
115        $("#drugie").trigger('refresh.owl.carousel');
116    }
117});
118*/
119$(".color_attributes>label:first").addClass('active');
120
121function buyClick() {
122    // waiting for the attribute change event to work
123    setTimeout(function () {
124        $('.btn-primary.buy').click();
125    }, 100);
126}
127
128function quickOrderClick() {
129    // waiting for the attribute change event to work
130    setTimeout(function () {
131        $('.buy_one_click').click();
132    }, 100);
133}
134
135

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.