0
Please find the attached reference image hereホバー上のオプション内のオプションを開くことができません。 Safariを除くすべてのブラウザで動作します。もし誰かが同じことを考えているなら、私たちに知らせてください。OnmouseenterとonmouseleaveがSafariブラウザで動作しない
showContextMenu = function (contextContents) {
var j = 0;
var html = '<div onmouseenter="$(this).show();" onmouseleave="mouseLeaveHandlerContextMenu(' + contextContents.id + ')" id="contextMenu' + contextContents.id + '" class="context_menu" style="left: ' + contextContents.left + 'px; top: ' + contextContents.top + 'px"><div class="context_menu_inner">';
for (var i = 0; i < contextContents.lists.length; i++) {
if (contextContents.lists[i].icon) {
j++;
var subMenu = contextContents.lists[i].subMenu;
html += '<div class="box"><div class="photo"><span class="glyphicon ' + contextContents.lists[i].icon + '"></span>'
+ '</div><div ' + ((contextContents.lists[i].href && contextContents.lists[i].href != '') ? 'onclick="window.location.href=\'' + contextContents.lists[i].href + '\'"' : '') + ' class="text' + (contextContents.lists[i].border && contextContents.lists[i].border == true ? ' bor_bottom' : '') + '" ' +
(subMenu && subMenu.length > 0 ? ' onmouseleave="$(\'#contextMenu' + (contextContents.id + '' + (i + 1)) + '\').hide()" onmouseenter="showContextMenu({ id: ' + (contextContents.id + '' + (i + 1)) + ', left: $(this).offset().left + $(this).width(), top: $(this).offset().top, lists: ' +
JSON.stringify(contextContents.lists[i].subMenu).replace(/"/g, "\'")
+ '})"' : '') +
'>' + (contextContents.lists[i].text) +
((subMenu && subMenu.length > 0) ? '<span class="glyphicon glyphicon-triangle-right submenu-icon"></span>' : '') +
'</div></div>';
}
}
html += '</div></div>';
if (contextContents.id == 1) {
$('#contextCollection').html(html);
}
else {
$('#contextCollection').append(html);
}
if (j > 0) {
$('#contextMenu' + contextContents.id).show();
}
$(document).on('click', function() {
$('#contextCollection').html('');
//$(document).off('click');
});
}
この変更に取り組んでいません。 –
@Vivek - 文字列をすべて英数字にするために使用される変数の値はありますか?変数を英数字の値に置き換えると、私は何の問題も見ません。 – Gerard
私は同じものを変更しましたが、動作しませんでした。私の関心事は、マウスをオプションで持ってきてからオプションがホバーに来ないときです。 –