Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8963431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:21:13+00:00 2026-06-15T16:21:13+00:00

I am trying to use Swipe JS 2 with jQuery Mobile (carefully taking into

  • 0

I am trying to use Swipe JS 2 with jQuery Mobile (carefully taking into consideration the notes here).

However, I find there is a problem with a clash of trying to use float: left. I can not interfere with the Swipe JS 2 references so the swipe motion on touch devices will work.

What this means is that the data that should be displayed in a grid, just gets displayed in a vertical column.

When examining the inspector for the CSS that should set the display to the grid I see the following:
enter image description here

Note, it seems that inorder to see the slide motion it is only possible to do this on a touch device (mobile, tablet, etc).

When you run the following, the swipe motion works, but the data does not display in a grid (code on jsfiddle: http://jsfiddle.net/u1sonderzug/YSGY3/, preview on jsfiddle: http://jsfiddle.net/u1sonderzug/YSGY3/embedded/result/):

<html>
    <head>
        <title>Test Slide</title>
        <script type='text/javascript' src='http://code.jquery.com/jquery-1.7.1.js'></script>
        <link rel="stylesheet" type="text/css" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css">
        <script type='text/javascript' src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
        <script type='text/javascript' src="https://raw.github.com/bradbirdsall/Swipe/swipe2/swipe.js"></script>
        <style type='text/css'>
        /* Product CSS */
          
            .product {
            padding-top:10px;
            padding-bottom:10px;
            padding-left:24px;
            padding-right:24px;
            float:left;
        }
        /* Swipe 2 required styles */
        
            .swipe {
            overflow: hidden;
            visibility: hidden;
        }
        .swipe-wrap {
            overflow: hidden;
            position: relative;
        }
        .swipe-wrap div {
            float:left;
            width:100%;
            position: relative;
        }
        </style>
        <script type='text/javascript'>
            $('#home').live('pageshow',function(){
                window.slider = new Swipe(document.getElementById('slider'));
            });
        </script>
    </head>
    <body>
        <div data-role="page" id="home">
          <div data-role="content">
            <!-- Take out the FOLLOWING two lines to display grid correctly -->
            <div id='slider' class='swipe'>
              <div class='swipe-wrap'>
                <!-- Take out the ABOVE two lines to display grid correctly -->
                <div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                </div>
                <div><span><h1>This is the next page</h1></span></div>
                <!-- Take out the FOLLOWING two lines to display grid correctly -->
              </div>
            </div>
            <!-- Take out the ABOVE two lines to display grid correctly -->
          </div> 
        </div>
    </body>
</html>

​

When you run the following, the swipe motion does not work, but the data does display in a grid (code on jsfiddle: http://jsfiddle.net/u1sonderzug/JZQQY/, preview on jsfiddle: http://jsfiddle.net/u1sonderzug/JZQQY/embedded/result/):

<html>
    <head>
        <title>Test Slide</title>
        <script type='text/javascript' src='http://code.jquery.com/jquery-1.7.1.js'></script>
        <link rel="stylesheet" type="text/css" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css">
        <script type='text/javascript' src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
        <script type='text/javascript' src="https://raw.github.com/bradbirdsall/Swipe/swipe2/swipe.js"></script>
        <style type='text/css'>
        /* Product CSS */
          
            .product {
            padding-top:10px;
            padding-bottom:10px;
            padding-left:24px;
            padding-right:24px;
            float:left;
        }
        /* Swipe 2 required styles */
        
            .swipe {
            overflow: hidden;
            visibility: hidden;
        }
        .swipe-wrap {
            overflow: hidden;
            position: relative;
        }
        .swipe-wrap div {
            float:left;
            width:100%;
            position: relative;
        }
        </style>
        <script type='text/javascript'>
            $('#home').live('pageshow',function(){
                window.slider = new Swipe(document.getElementById('slider'));
            });
        </script>
    </head>
    <body>
        <div data-role="page" id="home">
          <div data-role="content">
           
                <div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                  <div class="product"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/62/NCI_Visuals_Food_Hamburger.jpg/220px-NCI_Visuals_Food_Hamburger.jpg" /></div>
                </div>
                <div><span><h1>This is the next page</h1></span></div>
               
          </div> 
        </div>
    </body>
</html>

​

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T16:21:15+00:00Added an answer on June 15, 2026 at 4:21 pm

    Change your .product styles to add in a width: auto !important; line like this:
    http://jsfiddle.net/b3Jyv/

     .product {
            padding-top:10px;
            padding-bottom:10px;
            padding-left:24px;
            padding-right:24px;
            float:left;
            width: auto !important;
        }
    

    The div that contains each image is getting it’s width set to 100% by the .swipe-wrap div set of style rules so there is no room for two products next to each other in the grid layout.

    I can’t work out how to change the window sizes on jsFiddle on my phone so I haven’t managed to test it (there isn’t enough room for two columns on the page as I look at it), but the above is the reason for the products appearing in a column so you should be able to work out a solution from there if this one doesn’t work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am need paint my image. I'm trying use JQuery in here this link:
I'm using Jquery Mobile pagination plugin and trying to work it into a plugin
I am trying to use the iosSlider for multiple pages. For example, to swipe
is there a way to use the swipe gesture to control the amount of
I'm trying to find a way to swipe images in my android application.I find
I am trying use Thread but i have some problem (I am beginner at
I'm trying to make an image rotator that works on mobile devices using swipe
I'm trying use jquery ui tabs together with js and mvc3. <div class=demo> <div
i'm tring to use jQuery touch swipe to click each li item. this is
i'm trying use facebook API to upload photo in my fan page. I downloaded

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.