Circular Drag and Drop
How do I make an circular drag and drop?
Dragging and resizing of circle elements.. What is a circular drag and drop? How do you make a circular drag and drop? This script and codes were developed by Jeff Daze on 18 January 2023, Wednesday.
Circular Drag and Drop - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Circular Drag and Drop</title> <link rel='stylesheet prefetch' href='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="container"> <button id="zoomPlus">ZOOM +</button><button id="zoomMinus">ZOOM -</button> <div class="drag" id="circle1"> <div class="circle">1</div> </div> <div class="drag" id="circle2"> <div class="circle">2</div> </div> <div class="drag" id="circle3"> <div class="circle">3</div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Circular Drag and Drop - Script Codes CSS Codes
body,html{ height:100%;
}
#container{ height:100%;
}
.drag{ width:100px; height:100px; border:1px solid transparent;
}
.circle{ border:1px solid #003; background-color: #37A047; -moz-border-radius:100%; -webkit-border-radius:100%; border-radius:100%; width:100%; height:100%; color:#FFF; text-align:center;
}
.selectedBorder{ border:1px solid #000; /* z-index:5 !important; */
}
/* ZOOOOOOM! */
/*
classes for browsers with zoom
*/
.zoomIn { zoom:200%; transform: scale(2);
}
.zoomOut { zoom:100%; transform: scale(1);
}
/*
and classes for browsers that don't support zoom
*/
.noZoom .zoomIn { -o-transform: scale(2); -moz-transform: scale(2); transform: scale(2);
}
.noZoom .zoomOut { -o-transform: scale(1); -moz-transform: scale(1); transform: scale(1);
}
Circular Drag and Drop - Script Codes JS Codes
$(function() { if($("#container").css("zoom") === undefined){ $("#container").addClass("noZoom"); }
$(".drag").draggable({ opacity: 0.75, stack: ".drag", start: function(e, ui){ selectBox($(this)); }
})
.resizable({ aspectRatio: true, handles: "all", autoHide: true
});
$(".drag").click(function(){ selectBox($(this));
});
$("#container").click(function(){ $(".drag").removeClass("selectedBorder");
}).children().click(function(){ return false;
});
function selectBox(element){ $(".drag").removeClass("selectedBorder"); $(element).toggleClass("selectedBorder"); //set highest z-index... var ziTop = 0; $(".drag").each(function(){ var ziTest = parseInt($(this).css("zIndex"), 10); if(ziTest > ziTop){ ziTop = ziTest; } }); $(element).css({ zIndex: ziTop+1 });
}
$("#zoomPlus").click(function(){ $("#container").addClass("zoomIn"); $("#container").removeClass("zoomOut");
});
$("#zoomMinus").click(function(){ $("#container").removeClass("zoomIn"); $("#container").addClass("zoomOut");
});
});
Developer | Jeff Daze |
Username | jeffdaze |
Uploaded | January 18, 2023 |
Rating | 3 |
Size | 2,451 Kb |
Views | 6,072 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
A test card for a Munchkin-like game | 2,044 Kb |
Transparent Gradient | 2,735 Kb |
Desktop Notifications | 1,975 Kb |
Code snippets for a Puyo clone | 2,363 Kb |
Simulation of famous C64 code... | 1,788 Kb |
Pulsing Button | 1,659 Kb |
Angular Drag Example | 2,497 Kb |
Winter Scene | 2,739 Kb |
Corner Triangle | 1,490 Kb |
Starfield using KineticJS | 3,290 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Zip Button test | Lje7462 | 1,932 Kb |
WRENCH - STAFF | Lolita-adams | 1,608 Kb |
SVG Icons Template | Legofsalmon | 2,618 Kb |
A Pen by Jay | Jaycode | 3,784 Kb |
Project Euler Problem 17 | Bfillmer | 2,739 Kb |
Yuliya v krylova | Rafszul | 37,351 Kb |
A form arranged using automatic placement. | Vikasford | 2,103 Kb |
Twitch JSON API | Jvhti | 2,808 Kb |
Working around OS X Dynamic Scrollbars | Jrjenk | 2,279 Kb |
CSS3 Media Queries demo | Machal | 1,824 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!