Morning all,
Here is my predicament:
I have a mini photo gallery as part of an information page in our mobile site. It displays one image and the user "Swipes" left or right to see the next and previous images. As a fall back for none "Swipe" devices i have 2 arrows, left and right, on their respective sides of the image. This all functions fine. When you click and hold on an image it expand to take up the full available width of the browser window. At this point the arrows are z-indexed and absolutely positioned above the image. This works fine when testing in chrome, however the tap functionality is not working on an iPhone. The arrows are visually z-indexed correctly but it appears something is preventing any action on them.
My initial thought is that the "swipe" action of the iPhone is preventing the "tap" on the image. The arrows are not links, just divs with an image and the action is triggered through jQuery. Are the to actions conflicting by chance? Any help would be fantastic!
This is my CSS(LESS): If anyone is not familiar with CSS LESS let me know and i will post it as generic CSS
- .photoGallery { // gallery container
- display: block;
- height: 160px;
- padding: 0; margin: 0;
- width: 100%;
- position: relative;
- overflow: hidden;
- background: #000;
- .galleryNav{ // class of left and right arrows
- position:absolute;
- top:60px;
- z-index:99999;
- &.galleryLeft{ // sets left arrow position
- left:5px;
- }
- &.galleryRight { // sets right arrow position
- right:5px;
- }
- }
- div.galleryHolder { // images container
- width: 100000px;
- height: 100%;
- position: absolute;
- left: 0; top: 0;
- z-index:9;
- div.listing-photo { // individual image container
- float: left;
- position:relative;
- z-index:9;
- img { // image
- max-width: 200px;
- max-height: 130px;
- margin: 5px auto 0px;
- display: block;
- border:#222222 1px solid;
- }
- }
- }
- }
Cheers,
Graeme!