Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new Draggable('id', {
- onStart: function() {
- dPhoto = $('id');
- Event.stopObserving('id', 'click');
- },
- onEnd : function() {
- setTimeout("Event.observe('id', 'click', function() { location.href = 'url'; });", 500);
- },
- revert: true
- });
- new Draggable('tag',
- {
- revert:function()
- {
- $('tag').onclick = function(){return false;};
- setTimeout('$('tag').onclick = function(){return true;}','500');
- return true;
- }
- }
- );
- var click_func;
- function onDragStart(drgObj,mouseEvent){
- click_func = mouseEvent.target.onclick;
- mouseEvent.target.onclick = function(e){
- mouseEvent.target.onclick = click_func;
- return false;
- }
- }
- function onDragStart() {
- Event.stopObserving(this.OBJECT,'click');
- Event.observe(this.OBJECT,'click',this.onDragEnd.bindAsEventListener(this));
- }
- function onDragEnd() {
- Event.stopObserving(this.OBJECT,'click');
- Event.observe(this.OBJECT,'click',this.PREVIOUSFUNCTION.bindAsEventListener(this));
- }
Add Comment
Please, Sign In to add comment