Jump to content
Search Community

how do I detect filename of dropped image

new2gsock test
Moderator Tag

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

Here's my dragdrop code:
sym.$('card2').draggable({opacity:.5,revert:'invalid'});
sym.$('droptarget2').droppable({
accept:sym.$("card2"),
drop: function() {
sym.getSymbol("card2").play();
sym.getSymbol("droptarget2").play();
}
}

);

I want to have 2 different actions happen depending on the filename.

 

ie. 

if (droppedfilename=="qs.png") {

// accept and fade out

} else {

// don't accept

}

How do I detect the filename of the dropped image.

Link to comment
Share on other sites

Hi and welcome to the forums.

 

It looks like you are using jQueryUI Draggable/Droppable and not GreenSock Draggable.

 

This forum is focused on support for the GSAP suite only, as we don't have enough time in our days to also support other frameworks or general web development questions. Your question would be better suited at stackoverflow.com or forum.jquery.com

 

If I've misunderstood the question and you are having trouble with a GreenSock tool I apologise, but could you provide a bit more information so we can see where the problem lies.

  • Like 3
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.
×
×
  • Create New...