PageSourceSearch

https://www.life-changinghypnosis.com/plugins/smb/blog/components/…/assets/js/pagination-preview.js?v.1.0.91

js life-changinghypnosis.com collected 2026-09-29 21:53:50 UTC 1,851 bytes, 74 lines download raw bytes

1+function ($) { "use strict";
2	var PaginationDevicePreview = function($el, options) {
3		this.$el = $el;
4		this.$containers = $el.find('.pagination--device');
5		this.options = options;
6
7		this.showDevice();
8		this.attachEvents();
9    }
10
11    PaginationDevicePreview.prototype.attachEvents = function(){
12    	var self = this;
13
14    	$(window).resize(function(){
15    		self.showDevice();
16    	});
17    }
18
19    PaginationDevicePreview.prototype.showDevice = function(){
20    	this.$containers.hide();
21		var device = this.getDevice();
22
23		this.$el.find('.pagination--' + device).show();
24	}
25
26    PaginationDevicePreview.prototype.getDevice = function(){
27    	var width = $(window).width();
28
29    	if(width < 768)
30    		return 'mobile';
31
32    	if(width < 1024)
33    		return 'tablet';
34
35    	return 'desktop';
36    }
37
38    var old = $.fn.PaginationDevicePreview;
39
40    $.fn.paginationDevicePreview = function(option) {
41        var args = arguments,
42            result;
43
44        this.each(function() {
45            var $this = $(this);
46
47            var options = $.extend({}, $this.data(), typeof option == 'object' && option);
48            var data = '';
49
50            $this.data('PaginationDevicePreview', (data = new PaginationDevicePreview($this, options)));
51
52            if (typeof result != 'undefined') return false;
53        });
54
55        return result ? result : this;
56    };
57
58    $.fn.paginationDevicePreview.Constructor = PaginationDevicePreview
59
60    $.fn.paginationDevicePreview.noConflict = function () {
61        $.fn.paginationDevicePreview = old
62        return this
63    }
64
65    $(function(){
66    	$('[data-control="pagination-device-preview"]').paginationDevicePreview();
67    });
68}(window.jQuery);
69
70$(document).ready(function(){
71    $('.blog__pagination .fancy-pagination .current-page').click(function(){
72        $(this).next().toggleClass('active');
73    });
74});

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.