7
Wordpress: Swipe im Browser Dipl.-Ök. Joerg Niemann im Rahmen des 3. WP-Blogger Rhein-Ruhr

Swipe mit dem iPad und Wordpress

Embed Size (px)

DESCRIPTION

Folien vom Vortrag im Rahmen des 3. WP-BloggerTreffens

Citation preview

Page 1: Swipe mit dem iPad und Wordpress

Wordpress:Swipe im Browser

Dipl.-Ök. Joerg Niemannim Rahmen des 3. WP-Blogger Rhein-Ruhr

Page 2: Swipe mit dem iPad und Wordpress

Übersicht

➲ Was?

Touch-Steuerung / Swipe im Browser

➲ Wo?

Artikel in Wordpress Siehe WordPress Theme iYoko 0.1 – Swipe-Demo

➲ Wie?

Javascript

➲ Umsetzung

http://www.PadLive.de/ (nur via iOS-Device)

➲ Was jetzt?

Page 3: Swipe mit dem iPad und Wordpress

Wohttp://padlive.de/

Page 4: Swipe mit dem iPad und Wordpress

WieJavascript & AJAX

Webserver

Artikel B Artikel CArtikel A

Page 5: Swipe mit dem iPad und Wordpress

Umsetzung

Page 6: Swipe mit dem iPad und Wordpress

Javascript (I)• jQuery(document).ready(function($) {

if (navigator.platform == 'iPad' || navigator.platform == 'iPhone' || navigator.platform == 'iPod') {

jQuery("#swipeBox").show(); }; });

<div id="swipeBox" align="center" ontouchstart="touchStart(event,'swipeBox');" ontouchend="touchEnd(event);" ontouchmove="touchMove(event);" ontouchcancel="touchCancel(event);"><div style="float:left;"><img style="float:left;" src="arrow-3D-green-left.jpg" /></div>

<div class="swipeText">Swipe here!</div><div style="float:right;"><img style="float:right;" src="arrow-3D-green-right.jpg" /></div>

</div>

Page 7: Swipe mit dem iPad und Wordpress

Javascript (II)• <script src="padilicious.js" type="text/javascript"></script>

function processingRoutine() { var swipedElement = document.getElementById(triggerElementID); if ( swipeDirection == 'left' ) { getAdjacentLink('','next'); if(ajaxLink) window.document.location = ajaxLink; } else if ( swipeDirection == 'right' ) { getAdjacentLink('','prev'); if(ajaxLink) window.document.location = ajaxLink; } else if ( swipeDirection == 'up' ) {

... } else if ( swipeDirection == 'down' ) {

... } }