PageSourceSearch

https://dnlaw.com.vn/wp-content/themes/hazo/assets/js/index.js?ver=930369793

js dnlaw.com.vn collected 2026-09-25 05:46:16 UTC 9,417 bytes, 332 lines download raw bytes

1( function ( $ )
2{
3  window.onload = function ()
4  {
5    $( document ).ready( function ()
6    {
7      menuMobile();
8      backToTop();
9      showStaff();
10      //showServiceMb();
11      showTabMb();
12      showActiveServiceSb();
13      //  checkHeight()
14
15      $( ".home__slider-wrapper" ).flickity( {
16        pageDots: true,
17        wrapAround: true,
18        autoPlay: 3000,
19        contain: true,
20        imagesLoaded: true,
21        prevNextButtons: false,
22        draggable: false,
23      } );
24      $( ".home__slider-item" ).css( "display", "block" );
25    } );
26  };
27} )( jQuery );
28AOS.init();
29function menuMobile ()
30{
31  if (
32    $( ".header__bars" ).length ||
33    $( ".menu-mobile" ).length ||
34    $( ".overlay" ).length
35  )
36  {
37    $( ".header__bars" ).click( function ()
38    {
39      $( ".overlay" ).addClass( "overlay-active" );
40      $( ".menu-mobile" ).addClass( "menu-mobile-active" );
41    } );
42    $( ".overlay" ).click( function ()
43    {
44      $( ".overlay" ).removeClass( "overlay-active" );
45      $( ".menu-mobile" ).removeClass( "menu-mobile-active" );
46      $( ".box-search_header" ).removeClass( "active" );
47    } );
48    $( ".menu-mobile-close" ).click( function ()
49    {
50      $( ".overlay" ).removeClass( "overlay-active" );
51      $( ".menu-mobile" ).removeClass( "menu-mobile-active" );
52    } );
53  }
54
55  $( ".menu-mobile ul li.menu-item-has-children>ul" ).before(
56    `<span class="li-plus"></span>`
57  );
58  $(
59    ".menu-mobile ul li.current-menu-parent.menu-item-has-children .li-plus"
60  ).addClass( "clicked" );
61
62  if ( $( ".li-plus" ).length )
63  {
64    $( ".li-plus" ).click( function ( e )
65    {
66      if ( $( this ).hasClass( "clicked" ) )
67      {
68        $( this ).removeClass( "clicked" ).next( "ul" ).slideUp( 500 );
69      } else if ( $( this ).not( ".clicked" ) )
70      {
71        $( ".menu-mobile ul li > ul" ).slideUp( 500 );
72        $( ".li-plus" ).removeClass( "clicked" );
73        $( this ).addClass( "clicked" ).next( "ul" ).slideDown( 500 );
74      } else if ( $( this ).parents().siblings( "a" ).hasClass( "clicked" ) )
75      {
76        $( ".clicked" ).slideDown();
77        $( ".menu-mobile ul li > ul" ).slideUp( 500 );
78
79        $( this ).addClass( "clicked" ).next( "ul" ).slideDown( 500 );
80      } else
81      {
82        $( "#nav li a" ).removeClass( "clicked" ).next( "ul" ).slideUp( 500 );
83
84        $( this ).addClass( "clicked" ).next( "ul" ).slideDown( 500 );
85      }
86    } );
87  }
88}
89
90function backToTop ()
91{
92  var backToTop = document.querySelector( "#backTop" );
93
94  if ( backToTop == null )
95  {
96    return 0;
97  } else
98  {
99    window.addEventListener( "scroll", function ()
100    {
101      if ( window.pageYOffset > 100 )
102      {
103        backToTop.classList.add( "show" );
104      } else
105      {
106        backToTop.classList.remove( "show" );
107      }
108    } );
109    backToTop.addEventListener( "click", function ()
110    {
111      window.scroll( {
112        top: 0,
113        behavior: "smooth",
114      } );
115    } );
116  }
117}
118
119function showStaff ()
120{
121  $( ".room-title" ).click( function ()
122  {
123    $( this ).toggleClass( "active" );
124    $( this ).next( ".list-staff-name" ).children( "ul" ).slideToggle();
125  } );
126
127  // $(".list__rooms-staff .room-item:first-child .room-title").addClass("active");
128  // $(".list__rooms-staff .room-item:first-child .room-title")
129  //     .next(".list-staff-name")
130  //     .children("ul")
131  //     .slideToggle();
132}
133
134jQuery( document ).ready( function ( $ )
135{
136  $( ".list__rooms-staff a[href]" ).each( function ()
137  {
138    if ( this.href == window.location.href )
139    {
140      $( this ).closest( '.room-item' ).find( '.room-title' ).addClass( "active" );
141      $( this ).closest( '.child-terms' ).show();
142      $( this ).closest( 'ul' ).show();
143    }
144  } );
145
146  $( '.child-terms >li' ).each( function ()
147  {
148    if ( $( this ).find( 'ul' ).length )
149    {
150      $( this ).find( '>a' ).append( '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs" version="1.1" width="12" height="12" x="0" y="0" viewBox="0 0 512.011 512.011" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""><path d="M505.755,123.592c-8.341-8.341-21.824-8.341-30.165,0L256.005,343.176L36.421,123.592c-8.341-8.341-21.824-8.341-30.165,0    s-8.341,21.824,0,30.165l234.667,234.667c4.16,4.16,9.621,6.251,15.083,6.251c5.462,0,10.923-2.091,15.083-6.251l234.667-234.667    C514.096,145.416,514.096,131.933,505.755,123.592z" fill="#00558c" data-original="#000000" style="" class=""/></svg>' )
151    }
152    $( this ).click( function ()
153    {
154      $( this ).find( 'ul' ).slideToggle()
155    } )
156  } )
157  $( ".staff__main-tabs .nav .nav-link:first-child" ).addClass( "active" );
158  $( ".tab-content .tab-pane:first-child" ).addClass( "active" );
159
160  var current = location.pathname;
161  $( ".nav__news li a" ).each( function ()
162  {
163    var $this = $( this );
164    // if the current path is like this link, make it active
165    if ( $this.attr( "href" ).indexOf( current ) !== -1 )
166    {
167      $this.parent().addClass( "active" );
168    }
169  } );
170
171  $( "ul li a" ).each( function ()
172  {
173    var $this = $( this );
174    var href = $this.attr( "href" );
175
176    // Ensure the href attribute exists
177    if ( href && href.indexOf( current ) !== -1 )
178    {
179      $this.addClass( "current-cat" );
180    }
181  } );
182
183
184  $( ".archive .nav__box a" ).each( function ()
185  {
186    var $this = $( this );
187    var href = $this.attr( "href" );
188    // if the current path is like this link, make it active
189    if ( href && href.indexOf( current ) !== -1 )
190    {
191      $this.parent().addClass( "active" );
192    }
193  } );
194
195  $( ".list-staff-name li a" ).each( function ()
196  {
197    var $this = $( this );
198    var href = $this.attr( "href" );
199    // if the current path is like this link, make it active
200    if ( href && href.indexOf( current ) !== -1 )
201    {
202      $this.parent().parent().css( "display", "block" );
203      $this.parent().addClass( "active" );
204      $this.parent().parent().parent().prev( ".room-title" ).addClass( "active" );
205      // $this.parent().parent().parent().parent().find('h5').addClass('active');
206    }
207  } );
208} );
209
210$( document ).ready( function ()
211{
212  $( ".service-tab-list .nav-link:first-child" ).addClass( "active" );
213  if ( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test( navigator.userAgent ) )
214  {
215    $( ".nav-link" ).click( function ()
216    {
217      $( "html,body" ).animate(
218        {
219          scrollTop: $( ".tab-content" ).offset().top + -100,
220        },
221        300
222      );
223    } );
224  }
225  $( document ).on( "click", '.staff__main-tabs .nav-link', function ()
226  {
227    let index = $( this ).index()
228    let cat_id = $( this ).data( 'cat_id' );
229    let $this = $( this )
230    $.ajax( {
231      type: "POST",
232      url: "/wp-admin/admin-ajax.php",
233      data: {
234        action: "load_staff_by_category", // Tên hành động
235        cat_id: cat_id
236      },
237      dataType: "json", // Dữ liệu trả về dạng JSON
238      success: function ( response )
239      {
240        if ( response.success )
241        {
242          if ( $this.closest( '.staff__list-item' ).length > 0 )
243          {
244            $this.closest( '.staff__list-item' ).find( '.row' ).remove();
245            $this.closest( '.staff__list-item' ).append( response.data.data );
246          } else
247          {
248            $( '.staff__main-tabs .tab-content>.tab-pane' ).eq( index ).find( '.staff__list-item' ).html( response.data.data );
249            if ( $( '.staff__list-item' ).next( '.row' ).length == 0 )
250            {
251              $( '.staff__main-tabs .tab-content .nav-tabs .nav-link:first-child' ).click()
252            }
253          }
254        }
255      },
256    } );
257  } );
258  $( document ).on( "click", '.staff-title-mb', function ()
259  {
260    let cat_id = $( this ).data( 'cat_id' );
261
262    $.ajax( {
263      type: "POST",
264      url: "/wp-admin/admin-ajax.php",
265      data: {
266        action: "load_staff_by_category", // Tên hành động
267        cat_id: cat_id
268      },
269      dataType: "json", // Dữ liệu trả về dạng JSON
270      success: function ( response )
271      {
272        if ( response.success )
273        {
274          $( '.staff-title-mb.active' ).next( '.staff__list-item' ).html( response.data.data ); // Hiển thị dữ liệu trả về
275        }
276      },
277    } );
278  } );
279} );
280
281function showServiceMb ()
282{
283  if ( $( window ).width() < 768 )
284  {
285    if ( $( ".sidebar-service ul li" ).length > 2 )
286    {
287      $( ".sidebar-service ul li:nth-child(3) a" ).after(
288        "<span class='icon'></span>"
289      );
290    }
291  }
292  $( ".sidebar-service ul li .icon" ).click( function ()
293  {
294    $( ".sidebar-service" ).toggleClass( "show" );
295    $( this ).toggleClass( "rotate" );
296  } );
297}
298
299function showTabMb ()
300{
301  $( ".service__list-tab .title-mobile" ).click( function ()
302  {
303    $( this ).next( ".desc-content" ).slideToggle( 200 );
304    $( this ).toggleClass( "rotate" );
305  } );
306
307  $( ".list__staff .staff-title-mb" ).click( function ()
308  {
309    $( this ).next( ".staff__list-item" ).slideToggle( 200 );
310    $( this ).toggleClass( "active" );
311  } );
312}
313function showActiveServiceSb ()
314{
315  $( ".page-template-service .sidebar-service ul li:first-child" ).addClass(
316    "current-cat"
317  );
318  $( ".tax-service_cat .sidebar-service ul li:first-child" ).addClass(
319    "current-cat"
320  );
321}
322function checkHeight ()
323{
324  $( ".sidebar-service ul li a" ).each( function ()
325  {
326    if ( $( this ).height() > 27 )
327    {
328      $( this ).parent().addClass( "fill" );
329    }
330  } );
331}
332checkHeight();

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.