How do I get the user to click on a particular link, change the CSS and the title? For example:
I have this link: Contraste
By clicking on it, change the CSS and the name of the link too, going to Sem contraste
.
I started doing something, but JQuery is not my strong. See below:
<a href="#" id="contraste" class="ativar" style="font-weight: bold" accesskey="c" title="Contraste ALT + c">Contraste (c)</a>
$('#contraste').click(function(){
var acao = $(this.className);
if(acao === "ativar"){
// Alterar o CSS
}else{
// Voltar para o CSS atual
}
});