<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>I need Help</title>
<style media="screen">
.try {
padding: 3em;
background: #B51C35;
text-align: center;}
.try a {
display: inline-block;
padding: 0 .5em;
font-size: 2em;
font-weight: 900;
color: #FFFCED;
text-decoration: none;
border: 5px solid #FFFCED;}
</style>
</head>
<body>
<div class="">
<h3 style="text-align:center;">The event in the console was worked but remove Attribute is not work!! <br />I just need the advice or if you can told me why is not working? </h3>
</div>
<div class="try movemaus">
<a href="#">Book Now!</a>
</div><!-- .cta -->
<script>
const NEWSTYLE = document.querySelector(".movemaus");
NEWSTYLE.addEventListener('mouseleave', function(){NEWSTYLE.removeAttribute(".try");}, false);
NEWSTYLE.addEventListener('mouseleave', function(){console.log("The Function is work in the Console");}, false);
</script>
</body>
</html>
Dear All, The event in the console was worked but remove Attribute is not work!! I just need the advice or if you can told me why is not working? Thanks in Advance, Mustafa