SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast selfmindead's Avatar
    Join Date
    Nov 2004
    Las Vegas, NV
    0 Post(s)
    0 Thread(s)

    revert after dropping a draggable, only if out of bounds

    The below is a question... It's kinda hard to find help
    on these things, and the Rails Spinoffs section here at ruby-forum can't
    be posted to...

    Hi, I have a div tag as a “container” for all my draggable objects… My
    goal is to be able to decide whether to revert these objects based on
    where they are dropped. If they are “out of bounds”, or not in the
    container after they’ve been dropped, I want them to revert, otherwise,
    drop normally.

    I currently have a few JS functions setup that calculate the boundries
    of the container, and alert me on mouseup… true if they’ve been dropped
    outside of the container, and false if they’ve been dropped inside the

    By default, the droppable object is not set to revert… How would I go
    about making this object revert only if it’s been dropped outside of the

    Thanks ahead of time for any help…

  2. #2
    SitePoint Enthusiast kyko's Avatar
    Join Date
    May 2006
    0 Post(s)
    0 Thread(s)
    I'm sorry i cannot help you much here as i am no JS expert but i can tell you that you will get a better response/answer if you post this in a JS forum instead. scriptaculous is bundled with rails but has really nothing to do with ruby code
    Stop Global  


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts