javascript - Bolding text when dt element is clicked (and staying that way until clicked again) -


here's question today:

how make dt tag element html appear bold once clicked, , stay bold until dt element clicked and/or section drop-down dt closed?

i'm using bootstrap 2.x/3 compliant css sheet, , trying figure out how without needing modify hard code or delve javascript (though if viable options, i'm ears).

right code snippet this:

dt, .close { cursor:pointer; color:#093a7f !important; font-weight:normal; } dt:active, dt:focus { font-weight:bold !important; } 

again, idea have question stay bold until corresponding answer 'section' has been closed. above code bolds text when it's actively clicked.

any appreciated.

thanks! :d

add tabindex attribute element:

<dl>     <dt tabindex="1">title</dt>     <dd>content</dd>     <dt tabindex="2">title</dt>     <dd>content</dd> </dl> 

http://jsfiddle.net/y9h8w/


Comments

Popular posts from this blog

Why can rails not find a route created by a helper? -

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -