PageSourceSearch

https://darwinsantos.com/wp-content/plugins/impose-shortcodes/js/shortcodes.js

js darwinsantos.com collected 2026-10-08 10:44:47 UTC 3,444 bytes, 132 lines download raw bytes

1/*
2	Name: Impose 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		// ------------------------------
29		// TABS
30		$('.tabs').each(function() {
31			if(!$(this).find('.tab-titles li a.active').length) {
32				$(this).find('.tab-titles li:first-child a').addClass('active');
33				$(this).find('.tab-content > div:first-child').show();
34			} else {
35				$(this).find('.tab-content > div').eq($(this).find('.tab-titles li a.active').parent().index()).show();	
36			}
37		});
38		
39		$('.tabs .tab-titles li a').on( "click", function() {
40			if($(this).hasClass('active')) { return; }
41			$(this).parent().siblings().find('a').removeClass('active');
42			$(this).addClass('active');
43			$(this).parents('.tabs').find('.tab-content > div').hide().eq($(this).parent().index()).show();
44			return false;
45		});
46		// ------------------------------
47		
48		
49		// ------------------------------
50		// TOGGLES
51		var toggleSpeed = 300;
52		$('.toggle h4.active + .toggle-content').show();
53	
54		$('.toggle h4').on( "click", function() {
55			if($(this).hasClass('active')) { 
56				$(this).removeClass('active');
57				$(this).next('.toggle-content').stop(true,true).slideUp(toggleSpeed);
58			} else {
59				
60				$(this).addClass('active');
61				$(this).next('.toggle-content').stop(true,true).slideDown(toggleSpeed);
62				
63				//accordion
64				if($(this).parents('.toggle-group').hasClass('accordion')) {
65					$(this).parent().siblings().find('h4').removeClass('active');
66					$(this).parent().siblings().find('.toggle-content').stop(true,true).slideUp(toggleSpeed);
67				}
68				
69			}
70			return false;
71		});
72		// ------------------------------
73		
74		
75		
76	
77		
78		// ------------------------------
79		/* jQuery Ajax Mail Send Script */	
80		var contactForm = $( '#contact-form' );
81		var $submit = contactForm.find('.submit');
82		
83		contactForm.submit(function()
84		{
85			if (contactForm.valid())
86			{
87				$submit.addClass("active loading");
88				var formValues = contactForm.serialize();
89				
90				$.post(contactForm.attr('action'), formValues, function(data)
91				{
92					if ( data == 'success' )
93					{
94						setTimeout(function() { 
95							$submit.removeClass("loading").addClass("success"); 
96							contactForm.clearForm();
97						},2000);
98					}
99					else
100					{
101						$submit.removeClass("loading").addClass("error");
102					}
103				});
104			}
105			
106			return false
107		});
108
109		$.fn.clearForm = function() {
110		  return this.each(function() {
111		    var type = this.type, tag = this.tagName.toLowerCase();
112		    if (tag == 'form')
113		      return $(':input',this).clearForm();
114		    if (type == 'text' || type == 'password' || tag == 'textarea')
115		      this.value = '';
116		    else if (type == 'checkbox' || type == 'radio')
117		      this.checked = false;
118		    else if (tag == 'select')
119		      this.selectedIndex = -1;
120		  });
121		};
122		// ------------------------------
123		
124		
125		
126		
127		
128		
129    });
130    // DOCUMENT READY
131	
132})(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.