user2950370
user2950370

Reputation: 117

How do i include touch swipe? Dynamically load cross platform content and decrease page load times

The idea is to build a website which can grant a mobile and desktop user the full experience. 'The full experience' meaning the use of jquery.

The most important thing is accessibility, so I'm wondering if their is a cross platform way to build a slider/carousel which supports text, links and most importantly touch swipes.

To improve speed, I'd much prefer to load the slides seperately. I understand ajax maybe the solution.. but haven't a clue how. Can anyone direct me towards any basic tutorials that cover this?

A follow up question to the last.. Is ajax safe for dynamically loading content onto mobile devices too?

Also in terms of website layout. Most of the layout will change depending on css media rules when the page is resized. But there are a few elements that will need to teleport depending on the size of the screen.

I considered creating separate elements that would be hidden and shown with jquery/css, but not particularly liking the sound of the code being loaded when it's not needed. This is slightly different to the sliders in the sense that this code needs to be instantly responsive if the screen size changes (for example, a tablet user changing from portrait to landscape.. or a desktop user zooming in.) I just don't like the sound of code being loaded if it's hidden.. what is best practice for this?

Again the questions are..

thanks

Upvotes: 0

Views: 278

Answers (1)

Luminaire
Luminaire

Reputation: 334

3) touch swipes work the same way as a click + drag, so you should be able to use the same code for mobile and desktop. Here is a great example of this: http://scripterlative.com/files/dragdivscroll.htm

Upvotes: 0

Related Questions