Sha256: 7dd75552ca3573ec2e5ffbb7dd5dbc382f9e7197bed3ac28cec4d77c7c4640aa
Contents?: true
Size: 916 Bytes
Versions: 7
Compression:
Stored size: 916 Bytes
Contents
<style> #box { width: 30px; height: 30px; background-color: #900; position: absolute; top: 40px; } </style> <p>you should be able to drag the red box around. The links should let you enable and disable dragging.</p> <div id="box"></div> <script src="/depender/build?require=More/Drag.Move"></script> <div id="togglers"><a id="enable">enable drag</a> | <a id="disable">disable drag</a></div> <script> window.addEvent('load', function(){ //IE returns null when the offset parent is the document body //but other browsers return the body; force our test to return null Element.implement({ getOffsetParent: Function.from(null) }); $('box').inject(document.body).setStyles({ zIndex: 100, left: 200, top: 200 }); var dragger = $('box').makeDraggable(); $('enable').addEvent('click', function(){ dragger.attach(); }); $('disable').addEvent('click', function(){ dragger.detach(); }); }); </script>
Version data entries
7 entries across 7 versions & 1 rubygems