Hi jQuery Forum,
First off , you and I have something in common...
we like to learn new technologies...
it makes life different and fun and it feels new...
My Q is about a doc that I have.
I have assigned a css class to an anchor or link...in the .css file.
I am looking to make this link change its css style from the orignial to a new css style.
I must be rusty because ... I attempted to use .addclass ... to the link...
Now ... I am an unlucky guy whom sometimes finds things are bugged or broken or whatever...
so that is my luck...
So two things I see affecting my problem is ....
one) I have assigned a style to the "a:hover" selector and the a:link selector I put it as blank a:link { }
one.five) I don't know if these are permanent and unchangeable due to useability of anchors
two) I have assigned two styles to the link and the doc has links being used elsewhere on the page ...
two.five) i dont know if this will be conflicting in the doc tree
here is my codes:
.yesbaby{
display:inline-block;
border:4px solid #333333;
background-color:#999999;
color:#0000FF;
text-outline:none;
text-decoration:none;
font-style:normal;
font-size:16px;
font-family:"Comic Sans MS", sans-serif;
font-weight:900;
border-top-style:solid;
border-right-style:solid;
border-bottom-style:solid;
border-left-style:solid;
border-top-color:#333333;
border-right-color:#333333;
border-bottom-color:#333333;
border-left-color:#333333;
margin-top:0px;
margin-right:0px;
margin-bottom:3px;
margin-left:0px;
padding-top:3px;
padding-right:3px;
padding-bottom:3px;
padding-left:3px;
}
.yesbaby2{border:4px solid #333333;background-color:#333333;color:#66FF00;text-decoration:underline;}
here is my jQuery:
$(document).ready(function() {
$('p').hide();
$('a.timetoread2').click(function() {
$('p').show();
$('a.yesbaby').addclass('yesbaby2');}
$('this').hide();
return false;
});
});
If I wrote too much... sorry, there is nobody here to talk to today...
here is my html:
<a class="yesbaby timetoread2" href="#">Decide to read</a>
In the end... the link makes my paragraph show
and
I want the link to change its css style...
from
yesbaby
to
yesbaby2
ty