I have a page that load contents using
$('#header').load('head.html')
, but the links inside head.html cannot use my website.css because website.css loaded earlier or for another reason.
so I thought this $('a:hover').css('color','green');
but no success.
I can solve with tags but I dont want to do it.
Update:
base.html
<script>
$('#header').load('/restaurant{{ chosenRest }}.html'); //chosenRest=1,2..etc
</script>
<div id="accordion">
<div id="header" > </div></div>
I have files like, restaurant1.html, restaurant2.html
restaurant1.html
<a href="/Giorgio"> Giorgio's </a>
website.css
a:hover {color:green};
now if I add something like
<style> a:hover {color:green; } </style>
to base.html it works, but I don't want to do that way.
update: Finally Solved
here what worked:
base.css I added a new class
.restaurant:a:hover {
color:green;
}
restaurant1.html
<a href="/Giorgio" class="restaurant"> Giorgio's </a>