Jump to content

Jquery Slideshow For Mobile Devices


newseed

Recommended Posts

I am working on a site that requested a mobile version.

 

elec tri cstep.com/eshop/m/index.asp (remove 2 spaces)

 

The goal here is to have the main image fit mobile unit's screen resolution from 320px up to 640px width.

 

As you can see I was able to achieve this with a static image by defining the image with width="100%".

 

You can test that it works by either resizing your desktop browser to be 320px or view with your mobile unit in two different resolution width.

 

Now my issue.

 

I need a jquery gallery/slideshow (with content and next/prev buttons) script that will allow this kind of auto resizing. I've found several scripts but all of them use positioning thus collapses the div causing the image to fit no larger than the containing div. Fixed width just doesn't work.

 

If no such script exist then what about a mobile sniffer that detects the resolution size? I could then apply 'if' statement to tell it which css to use that fits the resolution. This is what I have now but I have no way if it works for mobile units:

 

$(document).ready(function() {

 

if ((screen.width>=640) && (screen.height>=600)) {

$("link[rel=stylesheet]:not(:first)").attr({href : "detect640.css"});

}

else {

$("link[rel=stylesheet]:not(:first)").attr({href : "detect320.css"});

}

});

 

Keep in mind that I am working with ASP code (not php).

 

Thanks.

Link to comment
Share on other sites

I finally got this to work.

 

elec tri cstep.com/eshop/m/index.asp (remove 2 spaces)

 

I would like to get some feedback. If possible, a snapshot of that page along with what mobile device you are using.

 

For your info, I used this slideshow which includes flexible image resize dependent on what screen resolution is used and touch screen capability.

Link to comment
Share on other sites

The site does resize vertically and horizontally on my Droid phone, but the slideshow does not slide with the arrows. On iPad2 it resizes fine, but the slides are not very smooth, needs a couple of taps to slide.

 

Does your client really need a slideshow on mobile, I believe it is best to just deliver the necessary information on a mobile site and leave the bells and whistles to the main site. Just my 2 cents.

Link to comment
Share on other sites

  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...