Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 36403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:23:15+00:00 2026-05-10T14:23:15+00:00

I’ve asked this question to the forums on the Mootools website and one person

  • 0

I’ve asked this question to the forums on the Mootools website and one person said that my class selection was corrupted before an admin came along and changed my post status to invalid. Needless to say this did not help much. I then posted to a google group for Mootools with no response. My question is why doesn’t the ‘enter’, ‘leave’, ‘drop’ events fire for my ‘.drop’ elements? The events for the .drag elements are working.

<title>Untitled Page</title> <script type='text/javascript' src='/SDI/includes/mootools-1.2.js'></script> <script type='text/javascript' src='/SDI/includes/mootools-1.2-more.js'></script> <script type='text/javascript' charset='utf-8'>     window.addEvent('domready', function() {         var fx = [];         $$('#draggables div').each(function(drag){             new Drag.Move(drag, {                 droppables: $$('#droppables div'),                 onDrop: function(element, droppable){                     if(!droppable) {                     }                     else {                         element.setStyle('background-color', '#1d1d20');                     }                     element.dispose();                 },                 onEnter: function(element, droppable){                     element.setStyle('background-color', '#ffffff');                 },                 onLeave: function(element, droppable){                     element.setStyle('background-color', '#000000');                 }             });         });          $$('#droppables div').each(function(drop, index){             drop.addEvents({                 'enter': function(el, obj){                     drop.setStyle('background-color', '#78ba91');                 },                 'leave': function(el, obj){                     drop.setStyle('background-color', '#1d1d20');                 },                 'drop': function(el, obj){                     el.remove();                 }             });         });     }); </script>  <form id='form1' runat='server'> <div>     <div id='draggables'>     <div class='drag'></div>     <div class='drag'></div>     <div class='drag'></div>     <div class='drag'></div>     <div class='drag'></div>     <div class='drag'></div>     <div class='drag'></div>     <div class='drag'></div>     <div class='drag'></div>     <div class='drag'></div> </div>  <div id='droppables'>     <div class='drop'></div>     <div class='drop'></div>     <div class='drop'></div>     <div class='drop'></div>     <div class='drop'></div>     <div class='drop'></div> </div>  </div> </form> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T14:23:16+00:00Added an answer on May 10, 2026 at 2:23 pm

    Ok, it looks like there are a couple of issues here. As far as I can tell, there is no such thing as a ‘droppable’ in mootools. This means your events like ‘enter’, ‘leave’ and ‘drop’ won’t work. (These are events on the drag object)

    If you change those names to events that elements in mootools have (as in, DOM events) your code works perfectly. For instance, if you change ‘enter’ and ‘leave’ to ‘mouseover’ and ‘mouseout’, your events fire with no problem. (Opera 9.51 on Windows Vista)

    This appears to be the revelant line in the documentation for this, which stats to use DOM events.

    http://docs.mootools.net/Element/Element.Event#Element:addEvents

    Also, on that page, is a link to the events that regular elements can have

    http://www.w3schools.com/html/html_eventattributes.asp

    However, the advice ‘TG in SD’ gave you in the nabble forums is probably best. If you can, don’t bother using these events. Put whatever it is you need to do in the draggable object, and save yourself all this hassle.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.