I'm trying to remove the border of a div, but no luck. I've commented out the code in my css and it is the correct property that I want to remove. Here is the code I'm using currently. The background-color change is working that's in the code below but the removeClass is not.
var tab = getURLParameter("tab");
// Disable the visual style of the button since it is disabled for this page.
if (tab == "Property") {
$(".scrape-button").css('background-color', '#efefef');
$(".scrape-button:hover").removeClass('border');
}
Any ideas? Thanks!
Just remove the css property like this:
$(".scrape-button:hover").css('border','');
.removeClass()
is used for removing a declared css class from element.
The jQuery selector with hover pseudo class has no effect because there is no element in the page with hover state. I recommend you to try a different aproach
<script>
var tab = getURLParameter("tab");
if (tab == "Property") {
$(".scrape-button").addClass("disabled")
}
</script>
<style>
.disabled {
background-color: #EFEFEF;
}
.disabled:hover {
border: none;
}
</style>
$('.scrape-button:hover').css('border', 'none');
Try this
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With