From d8c574dc0e0e121e73082c8fa181551afa8bb443 Mon Sep 17 00:00:00 2001 From: scottjehl Date: Tue, 26 Oct 2010 09:26:22 -0400 Subject: [PATCH] fixed up the demo so it works with our current events anyway --- experiments/photos/_photo2.html | 16 ++++--- experiments/photos/_photo3.html | 16 ++++--- experiments/photos/_photo4.html | 16 ++++--- experiments/photos/_photo5.html | 16 ++++--- experiments/photos/_photo6.html | 15 ++++--- .../photos/{_photo1.html => index.html} | 14 +++---- experiments/photos/photos.css | 3 +- experiments/photos/photos.js | 42 +++++++++---------- 8 files changed, 63 insertions(+), 75 deletions(-) rename experiments/photos/{_photo1.html => index.html} (67%) diff --git a/experiments/photos/_photo2.html b/experiments/photos/_photo2.html index 0828bc0a..59fae846 100644 --- a/experiments/photos/_photo2.html +++ b/experiments/photos/_photo2.html @@ -4,29 +4,27 @@ jQuery Mobile Framework - Photo 1 + + -
- - +

A canoe

-
+
- - photo-canoe - + photo-canoe
diff --git a/experiments/photos/_photo3.html b/experiments/photos/_photo3.html index a1d93e77..bef3fe8f 100644 --- a/experiments/photos/_photo3.html +++ b/experiments/photos/_photo3.html @@ -4,29 +4,27 @@ jQuery Mobile Framework - Photo 1 + + -
- - +

A dock

-
+
- - photo-dock - + photo-dock
diff --git a/experiments/photos/_photo4.html b/experiments/photos/_photo4.html index 33cc0c4d..759e1d8f 100644 --- a/experiments/photos/_photo4.html +++ b/experiments/photos/_photo4.html @@ -4,29 +4,27 @@ jQuery Mobile Framework - Photo 1 + + -
- - +

A kayak

-
+
- - photo-kayak - + photo-kayak
diff --git a/experiments/photos/_photo5.html b/experiments/photos/_photo5.html index dd0899a9..4730b902 100644 --- a/experiments/photos/_photo5.html +++ b/experiments/photos/_photo5.html @@ -4,28 +4,26 @@ jQuery Mobile Framework - Photo 1 + + -
- - +

Nathan running

-
+
- - photo-run - + photo-run
diff --git a/experiments/photos/_photo6.html b/experiments/photos/_photo6.html index 9c03d506..a158f743 100644 --- a/experiments/photos/_photo6.html +++ b/experiments/photos/_photo6.html @@ -4,27 +4,26 @@ jQuery Mobile Framework - Photo 1 + + -
- - +

Sandy beach

-
+
- - photo-sand - + photo-sand
diff --git a/experiments/photos/_photo1.html b/experiments/photos/index.html similarity index 67% rename from experiments/photos/_photo1.html rename to experiments/photos/index.html index 7f3f65f2..93c1a1d4 100644 --- a/experiments/photos/_photo1.html +++ b/experiments/photos/index.html @@ -4,28 +4,26 @@ jQuery Mobile Framework - Photo 1 + + -
- - +

A bridge

-
+
- - photo-bridge - + photo-bridge
- Next +
diff --git a/experiments/photos/photos.css b/experiments/photos/photos.css index 824e5915..08047a41 100644 --- a/experiments/photos/photos.css +++ b/experiments/photos/photos.css @@ -1 +1,2 @@ -#photoview img { width: 100%; } \ No newline at end of file +.photoview .ui-content { padding: 0; } +.photoview img { width: 100%; } \ No newline at end of file diff --git a/experiments/photos/photos.js b/experiments/photos/photos.js index f7d8dab9..0cfcf013 100644 --- a/experiments/photos/photos.js +++ b/experiments/photos/photos.js @@ -1,23 +1,21 @@ -$(function(){ - $('.photoview') - .live('swipeleft',function(){ - $(this).find('a').ajaxClick(); - }) - .live('swiperight',function(){ - $(this).next().find('a:contains(Prev)').ajaxClick(); - }); - $('.photoview a').click(function(){ - event.stopImmediatePropagation(); - }) - .tap(function(event){ - $(this).ajaxClick(); - event.stopImmediatePropagation(); - }) - .taphold(function(event){ - $.fixedToolbars.toggle(); - event.stopImmediatePropagation(); - }) - - } -}); + +$('.photoview') + .live('pagebeforehide',function(){ + $.fixedToolbars.hide(true); + }) + .live('pageshow',function(){ + $.fixedToolbars.show(); + }) + .live('swipeleft',function(){ + $(this).find('a.next').click(); + }) + .live('swiperight',function(){ + $(this).next().find('a.prev').click(); + }); + +$('.photoview img').live('mousedown touchstart',function(event){ + event.preventDefault(); +}) + +