I Have this Javascript:
<script>
$('.tile').on('click', function () {
$(".tile").addClass("flipOutX");
setTimeout(function(){
$(".tile-group.main").css({ marginLeft:"-40px", width: "1080px"}).load("company-overview.html");
}, 2000);
});
</script>
This is great as it loads another page into the current page and that is helpful.
Question is, how can I change the background color of the a class that is already loaded?
The class is called metro as defined in its css that is included and is used to apply the background color of the main page.
EDIT -------
My JS now looks like this and still doesn't work...
<script>
$('.tile').on('click', function () {
$(".tile").addClass("flipOutX");
setTimeout(function(){
$(".metro.tile-area-darkCrimson").css('background-color', '#f36c20');
$(".tile-group.main").css({ marginLeft:"-40px", width: "1080px"}).load("musability-musictherapy-company-overview.html");
}, 2000);
});
</script>
not sure what is wrong any help really appreciated here !
btw the CSS class for .metro.tile-area-darkCrimson looks like this .....
.metro .tile-area-darkCrimson {
min-width: 100%;
height: 100%;
background-color: #1f255b !important;
transition: background-color .25s ease-in-out;
-moz-transition: background-color .25s ease-in-out;
-webkit-transition: background-color .25s ease-in-out;
}