PageSourceSearch

https://daidung.com/daidung-content/themes/flatsome-child/custom.js?ver=1.0

js daidung.com collected 2026-10-09 03:17:33 UTC 15,345 bytes, 467 lines download raw bytes

1jQuery(document).ready(function () {
2  jQuery(".block-gt")
3    .find("a")
4    .each(function () {
5      jQuery(".banner-lich-su").hide();
6      jQuery(".banner-lanh-dao").hide();
7      jQuery(".select-he-thong-sx").hide();
8      jQuery(".select-he-thong-tc").hide();
9      jQuery(this).on("click", function () {
10        jQuery("#box-2").html(jQuery(this).html());
11        if (
12          jQuery(this).find("span").html() === "Tổng quan" ||
13          jQuery(this).find("span").html() === "About DDC"
14        ) {
15          jQuery(".tong-quan-2").show();
16          jQuery(".row-tq").show();
17        } else {
18          jQuery(".tong-quan-2").hide();
19        }
20        if (
21          jQuery(this).find("span").html() === "Lịch sử công ty" ||
22          jQuery(this).find("span").html() === "History of Development"
23        ) {
24          jQuery(".banner-lich-su").show();
25        } else {
26          jQuery(".banner-lich-su").hide();
27        }
28        if (
29          jQuery(this).find("span").html() === "Ban lãnh đạo" ||
30          jQuery(this).find("span").html() === "Organizational Structure"
31        ) {
32          jQuery(".banner-lanh-dao").show();
33        } else {
34          jQuery(".banner-lanh-dao").hide();
35        }
36        if (
37          jQuery(this).find("span").html() === "Hệ thống sản xuất" ||
38          jQuery(this).find("span").html() == "Facilities & Factories"
39        ) {
40          jQuery(".select-he-thong-sx").show();
41        } else {
42          jQuery(".select-he-thong-sx").hide();
43        }
44        if (
45          jQuery(this).find("span").html() === "Hệ thống tiêu chuẩn" ||
46          jQuery(this).find("span").html() === "Certification"
47        ) {
48          jQuery(".select-he-thong-tc").show();
49        } else {
50          jQuery(".select-he-thong-tc").hide();
51        }
52      });
53    });
54  jQuery(".block-tt")
55    .find("a")
56    .each(function () {
57      jQuery(this).on("click", function () {
58        jQuery("#box-2").html(jQuery(this).html());
59      });
60    });
61  jQuery(".block-nha-may-sx")
62    .find("a")
63    .each(function () {
64      jQuery(".block-san-xuat-longan").hide();
65      jQuery(".block-san-xuat-mientrung").hide();
66      jQuery(this).on("click", function () {
67        jQuery("#box-2").html(jQuery(this).html());
68
69        if (jQuery(this).find("span").html() != "An Ha factory") {
70          jQuery(".block-san-xuat-ct").hide();
71        }
72        if (jQuery(this).find("span").html() != "Nhà máy An Hạ - Bình Chánh") {
73          jQuery(".block-san-xuat-ct").hide();
74        }
75        if (
76          jQuery(this).find("span").html() == "An Ha factory" ||
77          jQuery(this).find("span").html() == "Nhà máy An Hạ - Bình Chánh"
78        ) {
79          jQuery(".block-san-xuat-ct").show();
80        }
81        if (jQuery(this).find("span").html() != "Long An factory") {
82          jQuery(".block-san-xuat-longan").hide();
83        }
84        if (jQuery(this).find("span").html() != "Nhà máy Long An") {
85          jQuery(".block-san-xuat-longan").hide();
86        }
87        if (
88          jQuery(this).find("span").html() == "Long An factory" ||
89          jQuery(this).find("span").html() == "Nhà máy Long An"
90        ) {
91          jQuery(".block-san-xuat-longan").show();
92        }
93        if (jQuery(this).find("span").html() != "Dung Quat factory") {
94          jQuery(".block-san-xuat-mientrung").hide();
95        }
96        if (jQuery(this).find("span").html() != "Nhà máy Miền Trung") {
97          jQuery(".block-san-xuat-mientrung").hide();
98        }
99        if (
100          jQuery(this).find("span").html() == "Dung Quat factory" ||
101          jQuery(this).find("span").html() == "Nhà máy Miền Trung"
102        ) {
103          jQuery(".block-san-xuat-mientrung").show();
104        }
105      });
106    });
107});
108jQuery(document).ready(function () {
109  jQuery(".count").each(function () {
110    jQuery(this)
111      .prop("Counter", 0)
112      .animate(
113        {
114          Counter: jQuery(this).text(),
115        },
116        {
117          duration: 4000,
118          easing: "swing",
119          step: function (now) {
120            var num = Math.ceil(now).toString();
121            if (Number(num) > 999) {
122              if (num.length) {
123                var last = num.slice(-3);
124                var first = num.slice(0, num.length - 3);
125                jQuery(this).text(first + "." + last);
126              }
127            } else {
128              jQuery(this).text(num);
129            }
130          },
131        }
132      );
133  });
134});
135jQuery(document).ready(function () {
136  var url = decodeURI(location.href);
137  qs = url.split("#");
138  var last = decodeURI(qs[1]);
139  jQuery(".chi-tiet-du-an .panel").removeClass("active");
140  if(last){
141  jQuery(document)
142    .find("#" + last)
143    .addClass("active");
144  jQuery(".chi-tiet-du-an .tab").removeClass("active");
145  jQuery(".chi-tiet-du-an .tab a").each(function () {
146    if (jQuery(this).attr("href") == "#" + last) {
147      jQuery(this).parent(".tab").addClass("active");
148    }
149  });
150  }
151});
152jQuery(document).ready(function () {
153  jQuery("#tuyendung-vn").click(() => {
154    var text = jQuery("#tuyendung-vn").attr("data-subject");
155    jQuery("[name='your-subject']").val(text);
156  });
157  jQuery("#tuyendung-en").click(() => {
158    var text = jQuery("#tuyendung-en").attr("data-subject");
159    jQuery("[name='your-subject']").val(text);
160  });
161});
162jQuery(document).ready(function () {
163  function IsEmail(email) {
164    var regex = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
165    if (!regex.test(email)) {
166      return false;
167    }
168    else {
169      return true;
170    }
171  }
172  jQuery("#downloadButton input[type='submit']").click(() => {
173    var name = jQuery("#downloadButton input[name='your-name']").val();
174    var subject = jQuery("#downloadButton input[name='your-subject']").val();
175    var email = jQuery("#downloadButton input[name='your-email']").val();
176    var regex = "/^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/";
177    var link = jQuery.trim(jQuery("#link_dl").attr("href"));
178    if (link.length && IsEmail(email) && name && subject) {
179      window.open(jQuery.trim(link), '_blank');
180    }
181    console.log("name", name);
182    console.log("subject", subject);
183    console.log("email", IsEmail(email));
184  });
185});
186
187document.addEventListener(
188  "wpcf7submit",
189  function (event) {
190    console.log("event", event);
191    if (
192      "752" == event.detail.contactFormId &&
193      event.detail.status == "mail_sent"
194    ) {
195      var link = jQuery.trim(jQuery("#link_dl").attr("href"));
196      if (link.length) {
197        // window.location.href = jQuery.trim(link);
198      }
199    }
200    if (
201      "2460" == event.detail.contactFormId ||
202      "2458" == event.detail.contactFormId
203    ) {
204      var link = jQuery.trim(jQuery("#link_dl").attr("href"));
205      if (link.length) {
206        window.location.href = jQuery.trim(link);
207      }
208    }
209  },
210  false
211);
212// jQuery(document).ready(function () {
213//   var url = decodeURI(location.href);
214//   qs = url.split("#");
215//   var last = decodeURI(qs[1]);
216//   jQuery(".tabbed-content .panel").removeClass("active");
217//   jQuery(document)
218//     .find("#" + last)
219//     .addClass("active");
220//   jQuery(".tabbed-content .tab").removeClass("active");
221//   jQuery(".tabbed-content .tab a").each(function () {
222//     console.log(last);
223//     if (jQuery(this).attr("href") == "#" + last) {
224//       jQuery(this).parent(".tab").addClass("active");
225//     }
226//   });
227// });
228
229jQuery(document).ready(function () {
230  var url = decodeURI(location.href);
231  qs = url.split("#");
232  var last = decodeURI(qs[1]);
233  jQuery(".tab-panels .tab_kết-cấu-thép").removeClass("active");
234  if(last){
235    jQuery(document)
236      .find("#" + last)
237      .addClass("active");
238    if (last != "undefined") {
239      jQuery(".nav .tab").removeClass("active");
240      jQuery(".block-nha-may .tab-panels .panel:first").removeClass("active");
241      if (last != "tab_nhà-máy-an-hạ" || last != "tab_an-ha-factory") {
242        jQuery(".block-san-xuat-ct").hide();
243      }
244      if (last == "tab_nhà-máy-long-an" || last == "tab_long-an-factory") {
245        jQuery(".block-san-xuat-longan").show();
246      }
247      if (last == "tab_nhà-máy-miền-trung" || last == "tab_du
247ng-quat-factory") {
248        jQuery(".block-san-xuat-mientrung").show();
249      }
250    }
251    jQuery(".tong-quan-2 .block-tam-nhin .nav .tab:first").addClass("active");
252    jQuery(".block-giai-doan .nav .tab:first").removeClass("active");
253    jQuery(".block-giai-doan .nav .tab:last").addClass("active");
254    jQuery(".block-giai-doan .tab-panels .panel:first").removeClass("active");
255    jQuery(".block-giai-doan .tab-panels .panel:last").addClass("active");
256    jQuery(".nav .tab a").each(function () {
257      if (jQuery(this).attr("href") == "#" + last) {
258        jQuery(this).parent(".tab").addClass("active");
259      }
260    });
261  }
262});
263
264// giới thiệu
265jQuery(document).ready(function () {
266  var url = decodeURI(location.href);
267  var tab = url.split("#");
268  var text = tab[1];
269  jQuery(".block-nha-may")
270    .find("a")
271    .each(function () {
272      var a = jQuery(this).attr("href");
273      var text1 = "#" + text;
274      if (text1 == a) {
275        var textnm = jQuery(this).find("span").html();
276        jQuery("#box-2").html(textnm);
277      }
278    });
279  jQuery(".block-tong-quan")
280    .find("a")
281    .each(function () {
282      var a = jQuery(this).attr("href");
283      var text2 = "#" + text;
284      if (text2 == a) {
285        var texttq = jQuery(this).find("span").html();
286        jQuery("#box-2").html(texttq);
287      }
288    });
289  if (text) {
290    // var text = tab[1].slice("4");
291    // var text1 = text.replaceAll("-", " ");
292    // var text2 = text1.charAt(0).toUpperCase() + text1.slice(1);
293    //jQuery("#box").html(text2);
294
295    if (text != "tab_tổng-quan") {
296      jQuery(".tong-quan-2").hide();
297      jQuery(".row-tq").hide();
298    }
299    if (text != "tab_about-ddc") {
300      jQuery(".tong-quan-2").hide();
301      jQuery(".row-tq").hide();
302    }
303    if (text == "tab_tổng-quan" || text == "tab_about-ddc") {
304      jQuery(".tong-quan-2").show();
305      jQuery(".row-tq").show();
306    }
307    if (text == "tab_lịch-sử-công-ty" || text == "tab_history-of-development") {
308      jQuery(".banner-lich-su").show();
309    }
310    if (text == "tab_ban-lãnh-đạo" || text == "tab_organizational-structure") {
311      jQuery(".banner-lanh-dao").show();
312    }
313
314    if (
315      text == "tab_hệ-thống-sản-xuất" ||
316      text == "tab_facilities-&-factories"
317    ) {
318      jQuery(".select-he-thong-sx").show();
319    }
320    if (text == "tab_hệ-thống-tiêu-chuẩn" || text == "tab_certification") {
321      jQuery(".select-he-thong-tc").show();
322    }
323  }
324});
325jQuery(document).ready(function () {
326    jQuery(".banner-lich-su").hide();
327    jQuery(".banner-lanh-dao").hide();
328    jQuery(".select-he-thong-sx").hide();
329    jQuery(".select-he-thong-tc").hide();
330});
331
332jQuery(document).ready(function() {
333    // Thêm các mục vào danh sách ngôn ngữ
334    jQuery('.header-language-dropdown ul.nav-dropdown-default').append(`
335        <li>
336            <a href="#" title="Japanese" class="nturl notranslate ja flag Japanese" data-lang="Japanese">
337                <i class="icon-image">
338                    <img src="https://daidung.com/daidung-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/jp.png" alt="日本語">
339                </i> 
340                日本語
341            </a>
342        </li>
343        <li>
344            <a href="#" title="Arabic" class="nturl notranslate ar flag Arabic" data-lang="Arabic">
345                <i class="icon-image">
346                    <img src="https://daidung.com/daidung-content/plugins/polylang-pro/vendor/wpsyntex/polylang/flags/arab.png" alt="العربية">
347                </i> 
348                العربية
349            </a>
350        </li>
351    `);
352
353    // Lắng nghe sự kiện nhấp vào các thẻ <a> trong danh sách
354    jQuery('.header-language-dropdown ul.nav-dropdown-default').on('click', 'a', function(e) {
355        e.preventDefault(); // Ngăn trình duyệt điều hướng ngay lập tức
356
357        var url = jQuery(this).attr('href'); // Lấy URL từ thuộc tính href của thẻ <a>
358
359        // Chỉ tiếp tục nếu href khác "#" và có URL hợp lệ
360        if (url !== "#" && url !== "") {
361            // Cập nhật hình ảnh trong thẻ <i class="image-icon">
362            var newImageSrc = jQuery(this).find('img').attr('src');
363            jQuery('.header-language-dropdown .image-icon img').attr('src', newImageSrc);
364
365            // Xóa cookie và điều hướng
366            setTimeout(function() {
367                window.location.href = url + '?clear_cookie=true';
368                console.log(url + '?clear_cookie=true');
369            }, 100); // Đợi 100ms trước khi điều hướng (để đảm bảo cookie được xóa)
370        } else {
371            // Nếu href là "#" thì chỉ cần thay đổi hình ảnh
372            var newImageSrc = jQuery(this).find('img').attr('src');
373            jQuery('.header-language-dropdown .image-icon img').attr('src', newImageSrc);
374        }
375    });
376});
377
378
379
380///////////
381class readMore {
382  constructor() {
383    this.content = ".readmore__content";
384    this.buttonToggle = ".readmore__toggle";
385  }
386
387  bootstrap() {
388    this.setNodes();
389    this.init();
390    this.addEventListeners();
391  }
392
393  setNodes() {
394    this.nodes = {
395      contentToggle: document.querySelector(this.content),
396    };
397    if (this.nodes.contentToggle) {
398      this.buttonToggle = this.nodes.contentToggle.parentElement.querySelector(
399        this.buttonToggle
400      );
401    }
402
403  }
404
405  init() {
406    const { contentToggle } = this.nodes;
407    if (contentToggle) {
408      this.stateContent = contentToggle.innerHTML;
409
410      contentToggle.innerHTML = `${this.stateContent.substring(0, 620)}...`;
411    }
412
413  }
414
415  addEventListeners() {
416    if (
417      typeof this.buttonToggle === 'object' &&
418      this.buttonToggle !== null
419    ) {
420      this.buttonToggle.addEventListener("click", this.onClick.bind(this));
421    }
422  }
423  onClick(event) {
424    const targetEvent = event.currentTarget;
425    const { contentToggle } = this.nodes;
426
427    if (targetEvent.getAttribute("aria-checked") === "true") {
428      targetEvent.setAttribute("aria-checked", "false");
429      contentToggle.innerHTML = this.stateContent;
430      this.buttonToggle.innerHTML = "show less";
431      this.buttonToggle.style.display = "none";
432    } else {
433      targetEvent.setAttribute("aria-checked", "true");
434      contentToggle.innerHTML = `${this.stateContent.substring(0, 620)}...`;
435      this.buttonToggle.innerHTML = "show more";
436    }
437  }
438}
439jQuery(document).ready(function () {
440
441    var imgs = jQuery('.header-language-dropdown img');
442
443    imgs.each(function(){
444        var src = jQuery(this).attr('src');
445
446        if(src && src.includes('gb.png')){
447            jQuery(this).attr('src', src.replace('gb.png','us.png'));
448        }
449    });
450
451    
452    setTimeout(() => {
453          jQuery('.header-language-dropdown').addClass('show-lang');
454
455    }, 500);
456});
457
458const initReadMore = new readMore();
459initReadMore.bootstrap();
460// //////////////////
461// window.addEventListener("scroll", function (event) {
462//   var scroll_y = this.scrollY;
463//   var scroll_x = this.scrollX;
464//   console.log(scroll_x, scroll_y);
465//   position.innerHTML = " X-axis : " + scroll_x + " và Y-axis : " + scroll_y;
466// });
467// JavaScript Document

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.