0
:hover
と:focus
のCSSプロパティを持つボタンがあります。ホバリングしている間、色は赤に変わります。 これをクリックするとAlertifyの確認ボックスが表示され、次にok3800を押すか、:focus
プロパティのために赤色の色の変更がキャンセルされます。 okをクリックするか、キャンセルすると、どうすれば:focus
をバインド解除できますか?"altertify"の確認モーダルを閉じた後、ボタンからフォーカスを削除するにはどうすればいいですか?
<html>
<head>
<script src="https://cdn.jsdelivr.net/alertifyjs/1.8.0/alertify.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/alertifyjs/1.8.0/css/alertify.min.css"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/alertifyjs/1.8.0/css/themes/default.min.css"/>
</head>
<style>
.btn-test:hover,.btn-test:focus{
background-color:red;
}
</style>
<body>
<button class="btn-test">Click Me</button>
</body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
$(".btn-test").click(function(){
alertify.confirm('Confirmation', 'You clicked', function() {
//do nothing
}
, function() {
//do nothing
});
});
</script>
</html>