Movendo objeto com o mouse - jQuery 20.04.12 23:05
Olá,
Achei o um efeito maravilhoso.
Com ele você pode mover o objeto.
Página:
# → Seleta um objeto ID:
Demo: http://pastehtml.com/view/bvghie2xe.html
Achei o um efeito maravilhoso.
Com ele você pode mover o objeto.
Página:
- Código:
<!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<style type="text/css">
#draggable { width: 100px; height: 70px; background: silver; }
</style>
<script>
$(document).ready(function() {
$("#draggable").draggable();
});
</script>
</head>
<body style="font-size:62.5%;">
<div id="draggable">Drag me</div>
</body>
</html>
- Código:
$(document).ready(function() {
$("Seletor").draggable();
});
- Código:
<div class="nha"></div>
$(document).ready(function() {
$(".nha").draggable();
});
# → Seleta um objeto ID:
- Código:
<div id="nha"></div>
$(document).ready(function() {
$("#nha").draggable();
});
Demo: http://pastehtml.com/view/bvghie2xe.html