I have a landing page with a full page banner and an enter button central. My problem is, to maintain visibility of the button. I need to change it's class from .dark to .light depending on if the background is a dark one or a light one.
I have looked into changing the DIV for a set time that matches my slider and make an array that matches the colour of the background image so the button will change colour according to my array. I also want the transition from changing each DIV to 'if possible' be a fade transition.
I know I am at risk of a duplicate post here but I want to stress this question is unique to stack overflow and I cannot find my answers elsewhere.
There seems to be plenty of solutions for cycling DIVs but I need to find the one right for my problem.
Okay, so from what I have read I have tried this with jQuery:
$(window).load(function(){
setTimeout(
function(){
$('#one').replaceWith($('#two'));
$('#two').show();
},
10000
);
});
I do not know how to move this into an array or add the transition, AND.. I believe this may just replace with a separate DIV, rather than just replacing the class in my DIV.
I have also looked at this:
$(document).ready(function(){
window.setTimeout(function(){
$(".one").replaceClass(".two");
},100);
});
However, this doesn't seem to operate and I am unsure as to how to fix? Can someone offer me a hand to solve this puzzle I am having.
EDIT:
<div class="door">
<img src="img/logo-inv.png">
<br>
<a href="#" class="btn btn-dark">ENTER</a>
</div>
I've simplified the code to avoid confusion. The tag I would like to change is "btn-dark".
href, text, ...)?