summaryrefslogtreecommitdiff
path: root/slideshows/default/template/events.js
diff options
context:
space:
mode:
authorBenjamin Kiessling <mittagessen@l.unchti.me>2012-01-20 00:17:19 +0100
committerBenjamin Kiessling <mittagessen@l.unchti.me>2012-01-20 00:17:19 +0100
commit9966181c78a7f0b9fa14e37df224186e4763d988 (patch)
treed5f938b5d54c96f14d5fc4f4efca61ac58b0d6c0 /slideshows/default/template/events.js
parent8f969b467bfec01cf4190e13b99b26cfe25e4ce6 (diff)
Revert "Update example slideshow to use jquery only"
This reverts commit 2b9c8aaefa38ded22efe3b3f4f8bd1eedf6ee6a5.
Diffstat (limited to 'slideshows/default/template/events.js')
-rw-r--r--slideshows/default/template/events.js51
1 files changed, 25 insertions, 26 deletions
diff --git a/slideshows/default/template/events.js b/slideshows/default/template/events.js
index e05b7cc..9d69547 100644
--- a/slideshows/default/template/events.js
+++ b/slideshows/default/template/events.js
@@ -1,26 +1,25 @@
-$(document).ready(function(){
-
- var tot=$('.event').length;
-
- var screenWidth = $('.events').width();
-
- var bord = $('.event').outerWidth() - $('.event').innerWidth();
- var padd = $('.event').innerWidth() - $('.event').width();
- var marg = $('.event').outerWidth(true) - $('.event').outerWidth();
- $('.event').width((screenWidth-(tot * (bord+padd+marg)))/tot);
-
- $('.eventDate').each(function(index, value) {
- var colours = ['blue', 'green', 'chreme'];
- $(this).addClass(colours[index % 3]);
- });
-
- $('.eventField').each(function(index, value) {
- var classStr = $(this).attr('class').split(/\s+/);
- if(classStr.indexOf('start') != -1) {
- $(this).show();
- } else if(classStr.indexOf('summary') != -1) {
- $(this).show();
- }
- });
-});
-
+$(document).ready(function(){
+
+ var tot=$('.event').length;
+
+ var screenWidth = $('.events').width();
+
+ var bord = $('.event').outerWidth() - $('.event').innerWidth();
+ var padd = $('.event').innerWidth() - $('.event').width();
+ var marg = $('.event').outerWidth(true) - $('.event').outerWidth();
+ $('.event').width((screenWidth-(tot * (bord+padd+marg)))/tot);
+
+ $('.eventDate').each(function(index, value) {
+ var colours = ['blue', 'green', 'chreme'];
+ $(this).addClass(colours[index % 3]);
+ });
+
+ $('.eventField').each(function(index, value) {
+ var classStr = $(this).attr('class').split(/\s+/);
+ if(classStr.indexOf('start') != -1) {
+ $(this).show();
+ } else if(classStr.indexOf('summary') != -1) {
+ $(this).show();
+ }
+ });
+});