Dragon Garda
Dragon Garda

Reputation: 15

Vanish element with jquery

I have a element which is draggable. I want this element to disappear after the user moves it quickly left from right.

$(function() {
    $( "#draggable" ).draggable();
});

The idea is to keep the element draggable, but if the user shakes it quickly (left to right or inverse), then the element disappears.

Upvotes: 0

Views: 240

Answers (1)

BoqBoq
BoqBoq

Reputation: 4704

You have to capture the Drag Event in your Draggable Window Plugin.... (if you are using one) And just say

$(this).hide();

Upvotes: 1

Related Questions