Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //*************************************************************************
- // Drag Drop
- //*************************************************************************
- $('.drop-container div').droppable({
- accept: ".small-lights",
- classes: {
- "ui-droppable-active": "ui-state-highlight"
- },
- drop: function(event, ui) {
- var $this = $(this);
- if($(this).hasClass('large-elements')){
- ui.draggable.find('img').attr('src').replace('small', 'large');
- }
- ui.draggable.position({
- my: "center",
- at: "center",
- of: $this,
- using: function(pos) {
- $(this).animate(pos, 200, "linear");
- $(this).css('padding', '0px');
- //$(this).find('img').attr('src').replace('small', 'large');
- }
- });
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement