Jump to content


Draggable and mouseover mouseout

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’m having weird behavior with mouseover and mouseout events being triggered only sporadically on elements inside a Draggable.


I actually want them to fire, but It seems they don’t at all until I used the draggable a first time, and then it works, but then with more subsequent dragging sometimes it works, sometimes not.


Any idea?

Link to comment
Share on other sites



Could you give us more details and a live sample?.


This setup is working for me:

See the Pen fLimI by rhernando (@rhernando) on CodePen


Feel free to fork it and accommodate it to your scenario in order to get a better look at the issue you're having.



  • Like 2
Link to comment
Share on other sites

True enough it works fine in your example. Must be something specific in what I’m working on.


Thanks for your quick reply.

  • Like 1
Link to comment
Share on other sites

I'm at day one of learning this stuff so go easy on me.  When I'm in the code pen environment Draggable works fine.  When I copy the code to dreamweaver I notice there's no link to the jquery  in the html so I add the link.  I get the Uncaught ReferenceError: jQuery is not defined



this is my code:

 <!DOCTYPE html><html>
<meta charset="utf-8" />
<script src="bonus-all/HTML5/src/minified/jquery.gsap.min.js"></script>
<script src="bonus-all/HTML5/src/minified/TweenMax.min.js"></script>
  font: 15px "Trebuchet MS", Arial, Helvetica, sans-serif;
  color: #fff

  font:bold 16px;

  position: relative;
  width: 600px;
  background: #222;
  border: solid 1px #fff;

  width: 75px;
  position: relative;
  background: #00f;
  border: solid 1px #f0f;

  border:solid 1px #fff;
  Mouse Over Event on Draggable instance's Children

<div id="draggable-element">
  <div class="child-element" id="first-child">First Child</div>
  <div class="child-element" id="second-child">Second Child</div>
  <div class="child-element" id="third-child">Third Child</div>
<div id="logDiv">
var draggableParent = $("#draggable-element"),
    draggableChilds = $(".child-element"),
    logDiv = $("#logDiv");


$.each(draggableChilds, function(i,e)
  var childId = $(e).attr('id');

Link to comment
Share on other sites

jquery.gsap.min.js is not jQuery. It's the GSAP plugin for jQuery. You'll need to include jQuery as well.

  • 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.