Jump to content
GreenSock

gibo

draggable ie8

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I've been draggable with the throwprops plugin.

 

I just wanted some clarification on how it works in IE8.

 

I've set it up like this:

 

Draggable.create($('.container'), {type:"x,y", throwProps:true, lockAxis:false, throwResistance: 0});

 

Currently I'm trying to get the position of the container after it's been dragged.

 

I do that like this:

 

$('.container).position().left

and like this:

$('.container).css('left')

 

Both of these calls return zero, is the container being moved around with a different property?

Link to comment
Share on other sites

Changing the x,y (which is really the css translateX and translateY transforms) is not the same as a positional (left/top) change.

 

Your Draggable instance has x and y properties that you can access.

 

Take a look at this demo and see how the x and y are accessed and displayed:

http://codepen.io/GreenSock/pen/FlDAa

Link to comment
Share on other sites

and for the record, IE8 filters (which are required to emulate transforms  like x, y, rotation, skew, scale, etc.) performs HORRIBLY compared to browsers that natively support transforms, so if your goal is to make something draggable in IE8, I'd recommend sticking with type:"left,top" instead. In all other cases, though, I'd recommend type:"x,y". 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×