[jQuery] Events not attaching; jquery 1.2.1 and interface elements 1.2
Having upgraded from jquery version 1.1.3.1 to 1.2.1 I've noticed a
problem within internet explorer whilst using interface elements.
This may be interface elements specific, though I have my doubts, or
it may be something with the latest release of jquery.. either way I'm
not really qualified to say one way or the other. So here's a small
test case that I've put together;
jquery 1.2.1
interface elements 1.2 using draggable and droppables
A html page with two divs (though 1 div is fine for testing)
<div id='main' style="height:50px;width:50px;background-color:red;"></
div>
<div class='drg' style="top:100px;left:100px;height:50px;width:
50px;background-color:blue;"></div>
Another js file with;
$(document).ready(function()
{
$('.drg').Draggable({zIndex:1000,ghosting:true,opacity:
0.7,revert:true,onStart: function(){},onDrag: function(x,y){},onStop:
function(){}});
});
The page loads fine with no errors. When I click the blue div (2nd
div in the above) and attempt to move it about I've no problems. When
I release the mouse; no problems. However, when I attempt to remove
the div it's as if all my events have been removed because I can no
longer move the div. If I place a click event like so;
$('.drg').mousedown(function(){alert('pop');});
then it'll fire fine... but as soon as the div is moved it also
fails. Note that this weird functionality only happens in IE (my
version is IE7 on XP) and not FireFox.....
Any help would be greatly appreciated. All the above worked fine when
using jquery 1.1.3.1