My stylesheet has two definitions:
bodytext a { border-bottom-color: #9aa1ae; border-bottom-width: 1px;
border-bottom-style: solid; color: #00589f; }
bodytext a:hover { border-bottom-color: #0d1117; border-bottom-width: 1px;
border-bottom-style: solid; color: #0d1117; }
and my page has an FAQ section, like so
<dl class='faq'>
<dt>Question 1</dt>
<dd>Answer 1</dd>
<dt>Question 2</dd>
<dd>Answer 1</dd>
</dl>
I wrote a simple jquery to expand/contract the FAQ, as follows:
$('dl.faq dd').hide();
$('dl.faq dt').click(function(){
$(this).next().slideToggle();
});
so that if javascript is off, the FAQ is still readable.
However, right now, I'm worried that my readers aren't clicking the questions to expand them. I'd like the dts to look like as so they look clickable, and preferably have the a and a:hover definitions appear only once in my stylesheet. How do I do this in jquery?