STYLE SWITCHER

Jquery

jQuery Adaptive Backgrounds

jQuery Adaptive Backgrounds

Adaptive Backgrounds is a simple jQuery plugin to extract the dominant color of an image and apply it to the background of its parent element.
Website
More
Responsive Morris.js graphs in Bootstrap 3 tabs

Responsive Morris.js graphs in Bootstrap 3 tabs

Morris.js is a javascript graph library based on the very competent raphael.js, I’ve come to include them in many projects lately because they are really dead simple to implement and they now, in the master branch, support the ability to natively resize with the page, in other words they are responsive, which is largely in demand right now.
https://coderwall.com/p/gvnhvw
More
Epoch

Epoch

54391
A general purpose real-time charting library for building beautiful, smooth, and high performance visualizations.
http://fastly.github.io/epoch/
More
Smooth Scrolling To Internal Links With jQuery

Smooth Scrolling To Internal Links With jQuery

$(document).ready(function(){
	$('a[href^="#"]').on('click',function (e) {
	    e.preventDefault();

	    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
				var target = $(this.hash);
					target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
					if (target.length) {
						$('html,body').animate({
						scrollTop: target.offset().top 
					}, 1000);
					return false;
					}
				}
	});
});
<a href=”#services”>Jump to services</a>

<div id=”services”>

</div>

Active class on mouse scroll

var aChildren = $("ul.anchor-list li").children(); // find the a children of the list items
		var aArray = []; // create the empty aArray
		for (var i=0; i &lt; aChildren.length; i++) {    
		var aChild = aChildren[i];
		var ahref = $(aChild).attr('href');
			aArray.push(ahref);
		} // this for loop fills the aArray with attribute href values
		
		
		$(window).scroll(function(){
			var windowPos = $(window).scrollTop(); // get the offset of the window from the top of page
			var windowHeight = $(window).height(); // get the height of the window
			var docHeight = $(document).height();
	
			for (var i=0; i &lt; aArray.length; i++) { 				var theID = aArray[i]; 				var divPos = $(theID).offset().top; // get the offset of the div from the top of page 				var divHeight = $(theID).height(); // get the height of the div in question 				if (windowPos &gt;= divPos &amp;&amp; windowPos &lt; (divPos + divHeight)) {
					$("a[href='" + theID + "']").parent().addClass("active");
				} else {
					$("a[href='" + theID + "']").parent().removeClass("active");
				}
			}
	
			if(windowPos + windowHeight == docHeight) {
				if (!$("ul.anchor-list li:last-child a").hasClass("active")) {
					var navActiveCurrent = $(".active").attr("href");
					$("a[href='" + navActiveCurrent + "']").removeClass("active");
					$("ul.anchor-list li:last-child a").addClass("active");
				}
			}
		});

Website
More
AngularJS

AngularJS

HTML is great for declaring static documents, but it falters when we try to use it for declaring dynamic views in web-applications. AngularJS lets you extend HTML vocabulary for your application. The resulting environment is extraordinarily expressive, readable, and quick to develop.
https://angularjs.org/
More
Simple jQuery Accordion

Simple jQuery Accordion

Toggle elements on a web page
HTML

<div class="accordion">
<div class="accordion-item">
Item 1
</div>
<div class="data">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy          text   ever since the 1500s,
</div>

<div>
Item 2
</div>
<div>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy          text   ever since the 1500s,
</div2

jQuery

$(function($) {
var allAccordions = $('.accordion div.data');
var allAccordionItems = $('.accordion .accordion-item');
$('.accordion > .accordion-item').click(function() {
if($(this).hasClass('open'))
{
$(this).removeClass('open');
$(this).next().slideUp("slow");
}
else
{
allAccordions.slideUp("slow");
allAccordionItems.removeClass('open');
$(this).addClass('open');
$(this).next().slideDown("slow");
return false;
}
});
});
More
ScrollMe

ScrollMe

A jQuery plugin for adding simple scrolling effects to web pages
http://scrollme.nckprsn.com/
More