In my project, I have card-footer class and I want to remove his style background-color property using the javascript. Can anyone tell me what's wrong with this function?
This is my html tag
<div class="card-footer">
<a name="" id="" class="btn btn-light" href="{{ route('posts.index') }}" role="button">Cancel</a>
<button type="submit" class="btn btn-primary float-right">Create</button>
</div>
script part
<script>
(function removeProp()
{
const cardFooter = document.querySelector(".card-footer");
cardFooter.style.removeProperty('background-color');
})();
</script>
Did I miss something or else?
background-color: none !important.