I need to override addthis
css property it is not working when i add !important
to it example
Works
$("#at4-scc").css("opacity", "1");
$("#at4-scc").css("visibility", "visible");
Result style="opacity: 1; visibility: visible;"
<div id="at4-scc" class="at-share-close-control ats-transparent at4-show at4-hide-content" title="Hide" style="opacity: 1; visibility: visible;">
<div class="at4-arrow at-left">Hide</div>
</div>
Doesn't Works
$("#at4-scc").css("opacity", "1 !important");
$("#at4-scc").css("visibility", "visible !important");
Result style=""
<div id="at4-scc" class="at-share-close-control ats-transparent at4-show at4-hide-content" title="Hide" style="">
<div class="at4-arrow at-left">Hide</div>
</div>
Not sure why it doesnt work. I have to override default css as that has !important
property with it
Default css
.at4-hide, .at4-hide-content {
opacity: 0 !important;
}
.at4-hide-content {
visibility: hidden;
}
I also tried below this add only the last css not both.
$('#at4-scc').attr('style', 'opacity: 1 !important');
$('#at4-scc').attr('style', 'visibility: visible !important');