.enableSelection() 1.6 追加 1.9 非推奨
マッチした要素集合のテキスト選択を有効にします。
.enableSelection()
戻り値:jQuery
サンプル
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>position demo</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css">
<style>
.positionDiv {
position: absolute; width: 75px; height: 75px;
}
.red{background:red}
.blue{background:blue}
.green{background:green}
.yellow{background:yellow}
</style>
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
</head>
<body>
<div id="targetElement">
<div class="positionDiv red" id="position1"></div>
<div class="positionDiv blue" id="position2"></div>
<div class="positionDiv green" id="position3"></div>
<div class="positionDiv yellow" id="position4"></div>
</div>
<script>
$( "#position1" ).position({ //red
my: "center",
at: "center",
of: "#targetElement"
});
$( "#position2" ).position({ //blue
my: "left top",
at: "left top",
of: "#targetElement"
});
$( "#position3" ).position({ //green
my: "right center",
at: "right bottom",
of: "#targetElement"
});
$( document ).mousemove(function( event ) {
$( "#position4" ).position({ //yellow
my: "left+3 bottom-3",
of: event,
collision: "fit"
});
});
</script>
</body>
</html>
© 2010 - 2017 STUDIO KINGDOM