PageSourceSearch

https://ieltstolinh.vn/wp-content/themes/ieltstolinh/assets/js/libs/change-layout.js

js ieltstolinh.vn collected 2026-10-03 21:27:10 UTC 2,835 bytes, 97 lines download raw bytes

1(function ($) {
2	"use strict";
3	$(document).ready(function () {
4		var owl = $("#slider-carousel");
5		var rtlval = false;
6		if($('body').hasClass('rtl')) {
7			var rtlval = true;
8		}
9		owl.owlCarousel({
10			rtl				 : rtlval,
11			items            : 3,
12			itemsDesktop     : [1000, 3],
13			itemsDesktopSmall: [900, 2],
14			itemsTablet      : [600, 1],
15			itemsMobile      : false,
16			pagination       : false
17		});
18		$(".next").click(function () {
19			owl.trigger('next.owl.carousel');
20		})
21		$(".prev").click(function () {
22			owl.trigger('prev.owl.carousel', [300]);
23		})
24	});
25	$(document).ready(function () {
26
27		if ($('.top-box').length) {
28			thim_change_layout.change_layout();
29		}
30
31	});
32	var activeClass = 'switcher-active';
33
34
35	var thim_change_layout = window.thim_change_layout = {
36		change_layout: function () {
37			var $parent = $('.archive, .blog');
38			// Change layout to grid or list
39			$('.top-box .list').on('click', function () {
40				thim_change_layout.switchToList();
41			});
42			$('.top-box .grid').on('click', function () {
43				thim_change_layout.switchToGrid();
44			});
45
46
47			var get_style = $parent.find('[data-getstyle]').attr('data-getstyle');
48
49			if (get_style === 'false') {
50				if (typeof(Storage) !== "undefined") {
51
52					if (typeof localStorage.blog_layout != 'undefined') {
53						if (localStorage.blog_layout === 'list') {
54							$parent.find('.top-box .list').addClass(activeClass);
55						} else {
56							$parent.find('.top-box .grid').addClass(activeClass);
57							$parent.find('article .entry-summary').css('display', 'none');
58							$parent.find('article .readmore').css('display', 'none');
59						}
60					} else {
61						$parent.find('.top-box .list').addClass(activeClass);
62					}
63				} else {
64					$parent.find('.top-box .list').addClass(activeClass);
65				}
66			} else {
67				if (get_style === 'list') {
68					thim_change_layout.switchToList();
69				} else {
70					thim_change_layout.switchToGrid();
71				}
72			}
73
74			thim_course_builder.post_gallery();
75
76		},
77		switchToList : function () {
78			var $parent = $('.archive, .blog');
79
80			$parent.find('.top-box .list').addClass(activeClass);
81			$parent.find('.top-box .grid').removeClass(activeClass);
82			$parent.find('article .entry-summary').show();
83			$parent.find('article .readmore').show();
84			$parent.find('.list-articles').removeClass('style-grid').addClass('style-list');
85			localStorage.blog_layout = 'list';
86		},
87		switchToGrid : function () {
88			var $parent = $('.archive, .blog');
89			$parent.find('.top-box .grid').addClass(activeClass);
90			$parent.find('.top-box .list').removeClass(activeClass);
91			$parent.find('article .entry-summary').css('display', 'none');
92			$parent.find('article .readmore').css('display', 'none');
93			$parent.find('.list-articles').removeClass('style-list').addClass('style-grid');
94			localStorage.blog_layout = 'grid';
95		},
96	};
97})(jQuery);

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.