Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('.folder').droppable({
- accept: '.file',
- tolerance: 'pointer',
- activate: function(e,ui)
- {
- $('.folder>img').attr('src','img/icons/arrow_right.png');
- },
- deactivate: function(e,ui)
- {
- $('.folder>img').attr('src','img/icons/folder.png');
- },
- over: function(e,ui)
- {
- if($(this).hasClass('active-folder'))
- {
- $(this).css({background:'#c68282'});
- }
- else
- {
- $(this).addClass('droppable-hover');
- }
- },
- out: function(e,ui)
- {
- if($(this).hasClass('active-folder'))
- {
- $(this).css({'background-image':'url(\"img/activefolder.jpg\")','background-repeat':'repeat-x'});
- }
- else
- {
- $(this).removeClass('droppable-hover');
- }
- },
- drop: function(e,ui)
- {
- var folderID = $(this).attr('id');
- var fileID = $(ui.draggable).attr('id');
- moveFile(folderID,fileID);
- }
- });
Add Comment
Please, Sign In to add comment