Commit cbf939d8 authored by Pascal Hartig's avatar Pascal Hartig

Site JS code style

parent 3a6d6afa
/*global $ */
(function() {
(function () {
'use strict';
$.fn.persistantPopover = function() {
$.fn.persistantPopover = function () {
var popoverTimeout;
function delay() {
popoverTimeout = setTimeout(function() {
popoverTimeout = setTimeout(function () {
$('.popover').hide();
}, 100);
}
return this.each(function() {
var $this = $( this );
return this.each(function () {
var $this = $(this);
$this.popover({
trigger: 'manual',
placement: 'right',
......@@ -20,16 +20,16 @@
title: this.firstChild.textContent + '<a href="' + $this.data('source') + '">Website</a>'
});
})
.mouseenter(function() {
clearTimeout( popoverTimeout );
.mouseenter(function () {
clearTimeout(popoverTimeout);
$('.popover').remove();
$( this ).popover('show');
$(this).popover('show');
})
.mouseleave(function() {
.mouseleave(function () {
delay();
$('.popover').mouseenter(function() {
clearTimeout( popoverTimeout ) ;
}).mouseleave(function() {
$('.popover').mouseenter(function () {
clearTimeout(popoverTimeout);
}).mouseleave(function () {
delay();
});
});
......@@ -84,11 +84,11 @@
Quotes.animate = function (container, animSpeed) {
var fader = function (fadeOut, fadeIn) {
var fadeOutCallback = function(){
var fadeOutCallback = function () {
fadeIn.fadeIn(500, fadeInCallback);
};
var fadeInCallback = function(){
var fadeInCallback = function () {
window.setTimeout(swap, animSpeed);
};
......@@ -126,8 +126,8 @@
Quotes.animate(container, 25000);
};
$.fn.quote = function(quotes) {
return this.each(function(){
$.fn.quote = function (quotes) {
return this.each(function () {
Quotes.init.call(this, quotes);
});
};
......@@ -143,21 +143,21 @@
gravatar: 'http://gravatar.com/avatar/ffe68d6f71b225f7661d33f2a8908281?s=40',
link: 'https://github.com/paulirish'
}
},{
}, {
quote: 'Modern JavaScript developers realise an MVC framework is essential for managing the complexity of their apps. TodoMVC is a fabulous community contribution that helps developers compare frameworks on the basis of actual project code, not just claims and anecdotes.',
person: {
name: 'Michael Mahemoff',
gravatar: 'http://gravatar.com/avatar/cabf735ce7b8b4471ef46ea54f71832d?s=40',
link: 'https://github.com/mahemoff'
}
},{
}, {
quote: 'TodoMVC is an immensely valuable attempt at a difficult problem - providing a structured way of comparing JS libraries and frameworks. TodoMVC is a lone data point in a sea of conjecture and opinion.',
person: {
name: 'Justin Meyer',
gravatar: 'http://gravatar.com/avatar/70ee60f32937b52758869488d5753259?s=40',
link: 'https://github.com/justinbmeyer'
}
},{
}, {
quote: 'It can be hard to make the leap from hacking together code that works to writing code that`s organized, maintainable, reusable, and a joy to work on. The TodoMVC project does a great job of introducing developers to different approaches to code organization, and to the various libraries that can help them along the way. If you`re trying to get your bearings in the world of client-side application development, the TodoMVC project is a great place to get started.',
person: {
name: 'Rebecca Murphey',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment