Mercurial > hg > MPIWGWeb
changeset 121:83782cd48e32
Merge with 4f522104ca62c66b96e8aef8f429d03ec4197126
author | casties |
---|---|
date | Wed, 29 May 2013 15:52:24 +0200 |
parents | 544a3c1e7f07 (current diff) 4f522104ca62 (diff) |
children | 4a54537ddcf7 |
files | css/mpiwg.css |
diffstat | 2 files changed, 67 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/css/mpiwg.css Wed May 29 15:17:43 2013 +0200 +++ b/css/mpiwg.css Wed May 29 15:52:24 2013 +0200 @@ -4,7 +4,9 @@ * Author: Robert Casties */ - + + + div.hierlist li.li_project a{ /*padding-left:0px;*/ }
--- a/js/mpiwg.js Wed May 29 15:17:43 2013 +0200 +++ b/js/mpiwg.js Wed May 29 15:52:24 2013 +0200 @@ -21,6 +21,11 @@ var $slider = this; var winW = this.width() - 2 * settings.buttonWidth; var sliderH = this.height(); + //var sliderH = "200px"; + + + + this.load(url, function () { var $window = $slider.find(settings.windowSel); var $content = $slider.find(settings.contentSel); @@ -37,10 +42,69 @@ $content.animate({'left':'-='+settings.scrollBy}, 'fast'); }); }); + + + }; }(jQuery)); +/* experimental function for adding swiping functionallities to the slider */ + +var startX; +var startY; +var endX +var endY + + +function touchStart(event){ + + + startX = event.touches[0].pageX; + startY = event.touches[0].pageY; + }; + +function touchMove(event){ + + endX = event.targetTouches[0].pageX; + + endY = event.targetTouches[0].pageY; + + +}; +function touchEnd(event){ + var scrollBy='143px'; + var contentSel = 'div.row'; + + //slider = document.getElementById('newBooksSlider'); + slider=event.currentTarget; + + content = $(slider).find(contentSel); + + if((startX-endX) > 0){ + + content.animate({'left':'-='+scrollBy}, 'fast'); + + } + if((startX-endX) < 0){ + content.animate({'left':'+='+scrollBy}, 'fast'); + } + + } + + + + +function initialize_swipe(selector){ + + $('.ajaxSlider').each(function(){ + this.addEventListener("touchstart",touchStart,false); + this.addEventListener("touchend",touchEnd,false); + this.addEventListener("touchmove",touchMove,false); + + } ); +}; + $(document).ready(function() { /* * autosubmit forms