Permalink
Browse files

Implemented slider logic.

  • Loading branch information...
1 parent cfb5a7b commit f9b4bb6597a8884c8161e87f4dcd842500a6c965 @akoenig akoenig committed Mar 26, 2012
@@ -12,7 +12,8 @@
*
*/
require([
- 'vendor/libraries'
+ 'vendor/order!vendor/libraries',
+ 'vendor/order!plugins/own'
],
function () {
console.log('Bremen.js ftw!');
@@ -0,0 +1,49 @@
+/*!
+ * bremen.js
+ *
+ * Copyright(c) 2012 Bremen, Germany
+ *
+ * Authors:
+ *
+ * Malte Legenhausen <mlegenhausen@gmail.com>
+ * André König <andre.koenig@gmail.com>
+ *
+ * MIT Licensed
+ *
+ */
+require([
+ 'vendor/order!vendor/libraries'
+], function () {
+ var activeClass = 'info-slider-on',
+ nodes = {
+ logo: $('body > header'),
+ body: $('body'),
+ slider: $('#info-slider'),
+ toogle: $('a[href="#info"]')
+ },
+ sliderHeight;
+
+ nodes.toogle.on('click', function (event) {
+ if (nodes.body.hasClass(activeClass)) {
+ nodes.logo.fadeOut(100);
+ nodes.slider.animate({
+ height: '+=50'
+ }, 400, function() {
+ nodes.slider.slideUp(200, function () {
+ nodes.body.removeClass(activeClass);
+
+ nodes.slider.height(sliderHeight);
+
+ nodes.logo.fadeIn(100);
+ });
+ });
+ } else {
+ if (!sliderHeight) {
+ sliderHeight = nodes.slider.height();
+ }
+
+ nodes.slider.slideDown(200);
+ nodes.body.addClass(activeClass);
+ }
+ })
+});
@@ -0,0 +1,16 @@
+/*!
+ * bremen.js
+ *
+ * Copyright(c) 2012 Bremen, Germany
+ *
+ * Authors:
+ *
+ * Malte Legenhausen <mlegenhausen@gmail.com>
+ * André König <andre.koenig@gmail.com>
+ *
+ * MIT Licensed
+ *
+ */
+define([
+ 'plugins/infoslidr',
+]);
@@ -1,3 +1,16 @@
+/*!
+ * bremen.js
+ *
+ * Copyright(c) 2012 Bremen, Germany
+ *
+ * Authors:
+ *
+ * Malte Legenhausen <mlegenhausen@gmail.com>
+ * André König <andre.koenig@gmail.com>
+ *
+ * MIT Licensed
+ *
+ */
define([
'vendor/underscore',
'vendor/jquery'

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit f9b4bb6

Please sign in to comment.