PageSourceSearch

https://vlstudies.com/wp-content/themes/divi-child/script.js?ver=6.1.10

js vlstudies.com collected 2026-09-26 15:55:19 UTC 9,669 bytes, 317 lines download raw bytes

1jQuery(document).ready(function ($) {
2  if ($(window).width() >= 981) {
3    $(".nav .menu-item-home a").addClass("et-pb-icon").html("");
4  }
5
6  // Homepage
7  setTimeout(function () {
8    $(".testimonials-slider-wrapper").slick({
9      slidesToShow: 2,
10      slidesToScroll: 2,
11      adaptiveHeight: true,
12      autoplay: false,
13      autoplaySpeed: 7000,
14      arrows: false,
15      dots: true,
16      pauseOnHover: true,
17      responsive: [
18        {
19          breakpoint: 540,
20          settings: {
21            slidesToShow: 1,
22            slidesToScroll: 1,
23          },
24        },
25      ],
26    });
27
28    $(".clients-slider-wrapper").slick({
29      slidesToShow: 5,
30      slidesToScroll: 5,
31      variableWidth: true,
32      autoplay: true,
33      arrows: true,
34      dots: false,
35      responsive: [
36        {
37          breakpoint: 1079,
38          settings: {
39            slidesToShow: 3,
40            slidesToScroll: 3,
41          },
42        },
43        {
44          breakpoint: 540,
45          settings: {
46            slidesToShow: 1,
47            slidesToScroll: 1,
48          },
49        },
50      ],
51    });
52  });
53
54  var imgURL =
55    window.location.origin +
56    "/wp-content/uploads/2020/07/Testimonial-stars.png";
57  $(".home .testimonials-slider-wrapper .et_pb_promo_description > div").append(
58    '<p><img src="' +
59      imgURL +
60      '" alt="" class="wp-image-6983" style="margin-top: 4px; height: 16px"/></p>'
61  );
62
63  // Blog in home
64  $("#learn-vese-online-accordion .et_pb_accordion_item").each(function (
65    i,
66    obj
67  ) {
68    var title = $(obj).find(".et_pb_toggle_title");
69    title.on("click", "span", function (e) {
70      window.location.href = $(this).data("link");
71    });
72  });
73
74  // Pagenavi
75  $("div.wp-pagenavi a").on("click", function (e) {
76    e.stopImmediatePropagation();
77  });
78
79  // Blog
80  // wrap blog article elements on archive pages
81  $(
82    ".et_pb_post:not(.category-falcuty), .archive .et_pb_post, .search .et_pb_post"
83  ).each(function () {
84    $(">:not(.et_pb_image_container)", this).wrapAll(
85      '<div class="wrapped"></div>'
86    );
87  });
88
89  // Testimonials
90  $(".blog-list__testimonial .et_pb_post").each(function () {
91    $(this).find("a").attr("href", "#");
92    var title = $(this).find(".entry-title").detach();
93    title.appendTo($(this).find(".wrapped"));
94    var date = $(this).find(".post-meta").detach();
95    date.appendTo($(this).find(".wrapped"));
96  });
97
98  // Forms
99  $(".btn-submit").on("click", function () {
100    $(this).closest("form").submit();
101  });
102
103  // Contact
104  // https://wiki.base22.com/btg/send-data-to-google-docs-using-a-web-form-and-ajax-72942000.html
105  if ($("#contact-form").is(":visible")) {
106    document.addEventListener(
107      "wpcf7mailsent",
108      function (event) {
109        $.ajax({
110          url: "https://docs.google.com/forms/d/e/1FAIpQLSe_yjk69lqskwhaKwCtJLYGDptSNcspufu3ZMrwqkDTJOafMA/formResponse",
111          data: {
112            "entry.1690226761": $('[name="student-name"]').val(),
113            "entry.857074419": $('[name="student-email"]').val(),
114            "entry.1677013562": $('[name="student-phone"]').val(),
115            "entry.1738263960": $('[name="student-nationality"]').val(),
116            "entry.747219216": $('[name="student-known-vietnamese"]').val(),
117            "entry.1245910708": $('[name="campus"]').val(),
118            "entry.1236928282": $('[name="off-campus-address"]').val(),
119            "entry.1551599680": $('[name="starting-date"]').val(),
120            "entry.1177088800": $('[name="student-message"]').val(),
121            "entry.2086202267": $('[name="from"]').val(),
122            "entry.2046403100": $('[name="referral"]').val(),
123          },
124          type: "POST",
125          dataType: "xml",
126          statusCode: {
127            0: function () {
128              console.log("DONE");
129            },
130          },
131        });
132
133        $(".wpcf7-mail-sent-ok").ajaxComplete(function () {
134          $(this).hide();
135        });
136      },
137      false
138    );
139  }
140
141  // Free trial lesson
142  if ($("#free-trial-lesson-form").is(":visible")) {
143    document.addEventListener(
144      "wpcf7mailsent",
145      function (event) {
146        $.ajax({
147          url: "https://docs.google.com/forms/d/e/1FAIpQLSe1SO6T-h7WRqqCUcGw8KKcT3MOigGH67JBMWYRsS168yva7Q/formResponse",
148          data: {
149            "entry.1690226761": $('[name="student-name"]').val(),
150            "entry.857074419": $('[name="student-email"]').val(),
151            "entry.1677013562": $('[name="student-phone"]').val(),
152            "entry.1738263960": $('[name="student-nationality"]').val(),
153            "entry.747219216": $('[name="student-known-vietnamese"]').val(),
154            "entry.1245910708": $('[name="campus"]').val(),
155            "entry.1236928282": $('[name="off-campus-address"]').val(),
156            "entry.1551599680": $('[name="starting-date"]').val(),
157            "entry.1177088800": $('[name="student-message"]').val(),
158            "entry.2086202267": $('[name="from"]').val(),
159            "entry.2046403100": $('[name="referral"]').val(),
160          },
161          type: "POST",
162          dataType: "xml",
163          statusCode: {
164            0: function () {
165              console.log("DONE");
166            },
167          },
168        });
169
170        $(".wpcf7-mail-sent-ok").ajaxComplete(function () {
171          $(this).hide();
172        });
173      },
174      false
175    );
176  }
177
178  // Online application
179  if ($("#online-application-form").is(":visible")) {
180    document.addEventListener(
181      "wpcf7mailsent",
182      function (event) {
183        $.ajax({
184          url: "https://docs.google.com/forms/d/e/1FAIpQLSe_yjk69lqskwhaKwCtJLYGDptSNcspufu3ZMrwqkDTJOafMA/formResponse",
185          data: {
186            "entry.1690226761": $('[name="student-name"]').val(),
187            "entry.857074419": $('[name="student-email"]').val(),
188            "entry.1677013562": $('[name="student-phone"]').val(),
189            "entry.1738263960": $('[name="student-nationality"]').val(),
190            "entry.747219216": $('[name="student-known-vietnamese"]').val(),
191            "entry.1245910708": $('[name="campus"]').val(),
192            "entry.1236928282": $('[name="off-campus-address"]').val(),
193            "entry.1551599680": $('[name="starting-date"]').val(),
194            "entry.1177088800": $('[name="student-message"]').val(),
195            "entry.2086202267": $('[name="from"]').val(),
196            "entry.2046403100": $('[name="referral"]').val(),
197          },
198          type: "POST",
199          dataType: "xml",
200          statusCode: {
201            0: function () {
202              console.log("DONE");
203            },
204          },
205        });
206
207        $(".wpcf7-mail-sent-ok").ajaxComplete(function () {
208          $(this).hide();
209        });
210      },
211      false
212    );
213  }
214
215  // Tabs
216  $(".custom-tabs .r-tab").first().addClass("active-tab");
217  $(".custom-tabs .r-tab-content").first().show();
218
219  $(".custom-tabs .r-tab").each(function () {
220    var tab_id = $(this).find("a").attr("href");
221    $(this).find("a").removeAttr("href");
222    $(this).click(function () {
223      if ($(this).hasClass("active-tab")) return;
224      $(this).siblings().removeClass("active-tab");
225      $(this).addClass("active-tab");
226      $(".r-tab-content").hide();
227      $(tab_id).fadeIn();
228    });
229  });
230
231  // Discounts
232  $(".discounts-slider-wrapper").slick({
233    slidesToShow: 4,
234    slidesToScroll: 4,
235    variableWidth: true,
236    arrows: true,
237    dots: false,
238    infinite: false,
239    responsive: [
240      {
241        breakpoint: 1079,
242        settings: {
243          slidesToShow: 2,
244          slidesToScroll: 2,
245        },
246      },
247      {
248        breakpoint: 540,
249        settings: {
250          slidesToShow: 1,
251          slidesToScroll: 1,
252        },
253      },
254    ],
255  });
256
257  $(".discounts-slider-wrapper .slick-slide").first().addClass("active-tab");
258  $(".d-tab-content").first().show();
259
260  $(".discounts-slider-wrapper .slick-slide").each(function () {
261    var tab_id = $(this).find("a").attr("href");
262    $(this).find("a").removeAttr("href");
263    $(this).click(function () {
264      if ($(this).hasClass("active-tab")) return;
265      $(this).siblings().removeClass("active-tab");
266      $(this).addClass("active-tab");
267      $(".d-tab-content").hide();
268      $(tab_id).fadeIn();
269      // var showingTabIndex = Number(tab_id.replace('#tab', '')) - 1;
270      // $('.d-tab-content').eq(showingTabIndex).fadeIn();
271    });
272  });
273
274  // Course dynamic - Tabs
275  $(".course-card .r-tab-content.tab1").show();
276  $(".course-card .r-tab").each(function () {
277    var tab_id = $(this).find("a").attr("href");
278    $(this).find("a").removeAttr("href");
279    $(this).click(function () {
280      if ($(this).hasClass("active-tab")) return;
281      $(this).siblings().removeClass("active-tab");
282      $(this).addClass("active-tab");
283      $(".r-tab-content").hide();
284      $(tab_id.replace("#", ".")).show();
285    });
286  });
287
288  // Our service dynamic - Tabs
289  $(".our-service-card .r-tab-content.tab1").show();
290  $(".our-service-card .r-tab").each(function () {
291    var tab_id = $(this).find("a").attr("href");
292    $(this).find("a").removeAttr("href");
293    $(this).click(function () {
294      if ($(this).hasClass("active-tab")) return;
295      $(this).siblings().removeClass("active-tab");
296      $(this).addClass("active-tab");
297      $(".r-tab-content").hide();
298      $(tab_id.replace("#", ".")).show();
299    });
300  });
301
302  // Falcuty
303  var $input = $("input[name='keyword']"),
304    $context = $(".falcuty-col");
305  $input.on("input", function () {
306    var term = $(this).val();
307    $context.show().unmark();
308    if (term) {
309      $context.mark(term, {
310        done: function () {
311          $context.not(":has(mark)").hide();
312        },
313        separateWordSearch: false,
314      });
315    }
316  });
317})

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.