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 8086577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:29:48+00:00 2026-06-05T18:29:48+00:00

What im looking to achieve is to modify the margin-left css property of a

  • 0

What im looking to achieve is to modify the margin-left css property of a div when someone slides their finger across the div on an ipad.

To explain what i’m trying to do, I have setup this page:
http://littleirrepressiblewonton.com/wp7/category/all/

Now when someone clicks on a thumbnail image, it loads a horizontal slideshow of large images. Some of the images are too wide to fit on the ipad and they wish to use touch to drag this horizontal slideshow of images left or right.

The way the divs are setup are as follows:

<div class='WontonGalleryFullsMask'>
<div class='WontonGalleryFulls' data-animating='no'>
    <div class="WontonGalleryFullImage" data-idx="0"  ><img src="http://littleirrepressiblewonton.com/wp7/wp-content/uploads/cache/VP_test_poster022/2835976114.jpg" alt="VP_test_poster022"  /></div>
    <div class="WontonGalleryFullImage" data-idx="1"  ><img src="http://littleirrepressiblewonton.com/wp7/wp-content/uploads/cache/VP_test_poster021/663128145.jpg" alt="VP_test_poster021"  /></div>
    <div class="WontonGalleryFullImage" data-idx="2"  ><img src="http://littleirrepressiblewonton.com/wp7/wp-content/uploads/cache/VP_test_poster020/3945564367.jpg" alt="VP_test_poster020"  /></div>
</div>
</div>

The div.WontonGalleryFullsMask has the following css and is setup as a mask.

height: 523px;
overflow: hidden;
width: 100%;

and then the margin-left property of the div.WontonGalleryFulls div is modified to move the gallery left and right.

So if someone slides 300px on the ipad, I need to modify the margin-left css property of the div.WontonGalleryFulls

I’m looking for a jquery solution as the site is already using it.

  • 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-05T18:29:50+00:00Added an answer on June 5, 2026 at 6:29 pm

    i ended up modifying a script from http://popdevelop.com/2010/08/touching-the-web/

    $.fn.draggable = function() {
    
    
    var offset = null;
      var start = function(e) {
        var orig = e.originalEvent;
        var ml = parseInt($(this).css('margin-left'));
        offset = {
          x: orig.changedTouches[0].pageX - ml //pos.left
        };
      };
      var moveMe = function(e) {
        e.preventDefault();
        var orig = e.originalEvent;
        $(this).css({
          'margin-left': orig.changedTouches[0].pageX - offset.x
        });
      };
      this.bind("touchstart", start);
      this.bind("touchmove", moveMe);
    };
    
    $('div.WontonGalleryFulls').css('position', 'absolute');
    $('div.WontonGalleryFulls').draggable();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

v. Rails 2.3.8 What I'm looking to achieve is to dynamically modify outbound links
I am looking for a tutorial to achieve an effect that is very easy
I'm looking for a way to achieve a menu kind of like the one
I am looking for a way to achieve a fading effect on an object
Looking at the Ehcahce implementation of net.sf.cache.JS107, I am trying to achieve the following
I am looking for the most standard way to achieve modal dialogs in ASP.NET
I am looking for a good example of how to achieve the following: I
I'm currently looking to achieve a gradient effect a bit like the rectangle in
I am looking to achieve the fastest and scalable communication between several servers. I've
I'm struggling to make this script work. What I'm looking to achieve is to

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.