PageSourceSearch

https://www.latestnewsresource.com/wp-content/plugins/life-shortcodes/js/shortcodes.js

js latestnewsresource.com collected 2026-10-02 12:01:42 UTC 3,731 bytes, 143 lines download raw bytes

1/*
2	Name: TheBlogger Shortcodes
3	Version: 1.0
4	Author: pixelwars
5*/
6
7(function($) { "use strict";
8	
9	/* DOCUMENT READY */
10	$(function() {
11		
12		
13		// ------------------------------
14		// FILL PROGRESS BARS
15		function fillBars() {
16			$('.bar').each(function() {
17				 var bar = $(this);
18                 var percent = bar.attr('data-percent');
19				 bar.find('.progress').css('width', percent + '%' ).html('<span>'+percent+'</span>');
20				});
21		}	
22		fillBars();
23		// ------------------------------
24		
25		
26		
27		// ------------------------------
28		// TABS
29		var tabs = $('.tabs'); 
30		if(tabs.length) {
31			tabs.each(function() {
32				if(!$(this).find('.tab-titles li a.active').length) {
33					$(this).find('.tab-titles li:first-child a').addClass('active');
34					$(this).find('.tab-content > div:first-child').show();
35				} else {
36					$(this).find('.tab-content > div').eq($(this).find('.tab-titles li a.active').parent().index()).show();	
37				}
38				setupFluidbox();
39			});
40			
41			tabs.find('.tab-titles li a').on("click", function() {
42				if($(this).hasClass('active')) { return; }
43				$(this).parent().siblings().find('a').removeClass('active');
44				$(this).addClass('active');
45				$(this).parents('.tabs').find('.tab-content > div').hide().eq($(this).parent().index()).show();
46				setupFluidbox();
47				return false;
48			});	
49		}
50		// ------------------------------
51		
52		
53		
54		// ------------------------------
55		// TOGGLES
56		var toggle = $('.toggle'); 
57		if(toggle.length) {
58			
59			var toggleSpeed = 300;
60			$('.toggle h4.active + .toggle-content').show();
61		
62			$('.toggle h4').on("click", function() {
63				if($(this).hasClass('active')) { 
64					$(this).removeClass('active');
65					$(this).next('.toggle-content').stop(true,true).slideUp(toggleSpeed);
66				} else {
67					
68					$(this).addClass('active');
69					
70					$(this).next('.toggle-content').stop(true,true).slideDown(toggleSpeed, function() {
71						setupFluidbox();
72						}
73					);
74					
75					setupFluidbox();
76					
77					//accordion
78					if($(this).parents('.toggle-group').hasClass('accordion')) {
79						$(this).parent().siblings().find('h4').removeClass('active');
80						$(this).parent().siblings().find('.toggle-content').stop(true,true).slideUp(toggleSpeed);
81					}
82					
83				}
84				return false;
85			});
86		}
87		// ------------------------------
88				
89	
90		
91		// ------------------------------
92		// CONTACT FORM
93		// jQuery Ajax Mail Send Script		
94		var contactForm = $( '#contact-form' );
95		var $submit = contactForm.find('.submit');
96		
97		contactForm.submit(function()
98		{
99			if (contactForm.valid())
100			{
101				$submit.addClass("active loading");
102				var formValues = contactForm.serialize();
103				
104				$.post(contactForm.attr('action'), formValues, function(data)
105				{
106					if ( data == 'success' )
107					{
108						setTimeout(function() { 
109							$submit.removeClass("loading").addClass("success"); 
110							contactForm.clearForm();
111						},2000);
112					}
113					else
114					{
115						$submit.removeClass("loading").addClass("error");
116					}
117				});
118			}
119			
120			return false
121		});
122
123		$.fn.clearForm = function() {
124		  return this.each(function() {
125		    var type = this.type, tag = this.tagName.toLowerCase();
126		    if (tag == 'form')
127		      return $(':input',this).clearForm();
128		    if (type == 'text' || type == 'password' || tag == 'textarea')
129		      this.value = '';
130		    else if (type == 'checkbox' || type == 'radio')
131		      this.checked = false;
132		    else if (tag == 'select')
133		      this.selectedIndex = -1;
134		  });
135		};
136		// ------------------------------
137		
138		
139		
140    });
141    // DOCUMENT READY
142	
143})(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.