編集: CSS を DOM に正しく割り当てるコードの 2 つのブラケットで動作するフォークを取得しましたが、親 div の中央に配置されなくなりました。何か案は?
jQuery:
$("#container").hover(function () {
$("#innerFocusPrompt").position({
my: "center center",
at: "center center",
of: "#container"
});
$("#innerFocusPrompt").css({
"display": "inherit"
}).fadeIn(100);
});
CSS:
#container {
background-color: black;
color: #121212;
height:400px;
width:400px;
margin: 0 auto;
margin-top: 50px;
}
#innerFocusPrompt {
display: none;
background-color: red;
color: black;
height:100px;
width:100px;
}