"Exploring the possibilities of combining jQuery Touch Punch with the power of css

I'm facing an issue with jQuery UI Touch Punch. I am able to drag everything smoothly, but when I apply css3's "translateY", it works perfectly on the computer but fails on iPad. The element suddenly jumps up at dragstart and then allows me to drag it around. Has anyone else encountered this problem?

I attempted to set translateY on my element during dragstart, but unfortunately, it did not resolve the issue. If I remove translate, the element ends up in the incorrect position, but at least the drag functionality works.

Answer №1

After creating my custom "convert" feature, I extracted half of the item's vertical measurement using jQuery's .outerHeight(), then incorporated it into top:50%. This approach eliminates the necessity for utilizing translateY and avoids any potential clashes with .draggable.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is causing the property to overflow when the tooltip is positioned absolutely there?

While browsing, I stumbled upon this "TryIt" link: https://www.w3schools.com/css/tryit.asp?filename=trycss_tooltip However, I found myself puzzled by... I understand the purpose of position:absolute;, but what confused me was why it wasn't displaying ...

Fade-in effect applied to images upon exposure

Is there a way to fade in an image based on the percentage scrolled, rather than a set number of pixels? I want my website to be responsive and adjust to all screen resolutions. Or perhaps is there a method to have the image fade in when it enters the fiel ...

Ways to prevent flex from expanding all the way to 100% width?

My section has two columns centered in flexbox, but the container doesn't wrap around them as expected and instead fills the whole page. How can I make the section wrap around the text with a padding of 1rem? body { background-color: #444; col ...

Modifying the color of the tooltip arrow in Bootstrap 4: A step-by-step guide

How can I change the arrow color of the tooltip using Bootstrap 4? Here is my current code: HTML: <div class="tooltip-main" data-toggle="tooltip" data-placement="top" data-original-title="Service fee helps Driveoo run the platform and provide dedicate ...

Words appear on the screen, flowing smoothly from left to right

I am trying to create a hover effect where a caption appears when an image is hovered over. The text should slide in from left to right, causing the container to grow along the X axis as the image is hovered over. I have managed to make the text appear on ...

Ways to showcase an icon within a select options tag

Is there a way to show Font Awesome icons in select options tag? I have tried using it outside like this <i class="fas fa-chart-pie"></i> But I'm not sure how to display it within the <option> tags instead of text. <select id="s ...

Exploring the dynamic world of Angular2 animations paired with the

In my layout, I have a row with three columns and two buttons to toggle the visibility of the side panels: col-md-3 col-md-7 col-md-2 ------------------------------------ | | | | | left | middle panel | | ...

Troubleshooting CSS compatibility issues in Firefox browser (or HTML rendering as plain text)

In a unique web page comparing two photos, the clicked one changes, but there's an issue in Firefox where HTML displays as text and links don't work. CODE:- * { box-sizing: border-box; } html { height: 100%; } body { height: 100%; mar ...

Loading texts with the same color code via ajax will reveal there are differences among them

I am currently designing a webshop with green as the primary color scheme. Everything is functioning perfectly, but I have noticed that the text within an ajax loaded div appears brighter than it should be. The text that loads traditionally is noticeably d ...

The carousel's slides don't behave properly when swiping or using the slider controls (next/prev)

I have recently completed the construction of a carousel with swipe/touch functionality and control buttons for previous and next slides. However, I am facing an issue with the behavior of the carousel as it seems to be sliding by 2 or 3 instead of one at ...

CSS style for centering double digit list items

My query is: <ul id="list"> <li> <a href=''>1</a> </li> <li> <a href=''>2</a> </li> <li> <a href=''>3</a> </li> <l ...

Adjust the Subnav <li> element to take up 100% width and reposition the dropdown menu

My current challenge involves customizing a navigation bar using CSS. I am struggling with making the sub-menus expand to 100% width as they currently appear fixed in size. Additionally, I am trying to find a solution to display the submenu options on eith ...

Using jQuery's .is(":visible") method to check if an element, positioned absolutely outside of the viewport, is visible

I am currently exploring the most effective method to determine the visibility state of a div container with the CSS property position: absolute. On the left side of my viewport, I have a sidebar. By clicking the "sidebar-button," the sidebar smoothly tra ...

How to position a div in the center of the screen with an overlay

While this code functions well in Firefox, it unfortunately does not work in IE. I am seeking a solution to properly center the div on the screen - Currently, the div is leaning too much towards the bottom In addition, I require the div with an id of "l ...

Tips for creating a responsive HTML5 form

I am trying to center and make my form responsive. Can you help me achieve that with the code below? HTML5 Code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html ...

Auto-scroll feature malfunctioning

My auto scroll function using jQuery isn't working, here is my CSS: #convo_mes{ text-align:left; width:98%; height:80%; background:#fff; border:1px solid #000; overflow-x:auto; } And in my JavaScript: $(".mes").click(functio ...

What is the best method for creating a header design in CSS?

My website code is pretty standard <div class="header"></div> <div class="site-inner"></div> <div class="footer"></div> How can I achieve a header background like the one shown in the image? Do I need to set the entire ...

What could be causing the CSS border to not show up on the webpage?

I am trying to add a border to the footer, but it seems like something is blocking it from showing properly. Below are the CSS lines I have used: position: fixed; bottom: 0; right: 0; left: 0; clear: both; line-height: 1.36em; padding: 08px 0px 0px; tex ...

Activate SVG graphics upon entering the window (scroll)

Can anyone assist me with a challenging issue? I have numerous SVG graphics on certain pages of my website that start playing when the page loads. However, since many of them are located below the fold, I would like them to only begin playing (and play onc ...

What is the process for toggling a Bootstrap alert using a button click?

Is there a way to display an alert box multiple times on a web page without the need to refresh it? Currently, when I try to show the alert box again after closing it once, I have to refresh the page. It seems that rendering a bootstrap alert on the page ...