私は次のものを持っています:
JS:
$(function() {
$(".fullscreen-toggle").toggle(
function() {
$("body").addClass("fullscreen");
$(".fullscreen-toggle").wrap("<div class='fixed-container fixed-toggle' />");
$(".new_post .wysihtml5-toolbar").wrap("<div class='fixed-container fixed-toolbar' />");
$(".new_post .form-actions").wrap("<div class='fixed-container fixed-submit' />");
$(this).children(".toggle-fullscreen").hide();
$(this).children(".exit-fullscreen").show();
},
function() {
$("body").removeClass("fullscreen");
$(".new_post .fixed-container").remove();
$(this).children(".toggle-fullscreen").show();
$(this).children(".exit-fullscreen").hide();
}
);
// Fade in/out for post fullscreen form
$('.fullscreen .fixed-toolbar').on("mouseover", function(){
$(this).show();
});
HTML:
したがって、ユーザーがツールバーの上にマウスを置くと、ツールバーが表示されます(jQueryで動的に追加されるon
ため、私は使用しています)。.fullscreen .fixed-toolbar
しかし、そうしても何も起こりません。
私が間違っているのは何ですか?
編集:
私はリンクで同じことを試みました、そしてそれは引き起こされました。divをホバリングしているときにそれを行う別の方法はありますか?