css - I can't make a jQuery UI accordion tab change colors when used (like a:visited), can I? -


i have ol' vanilla jquery ui accordion going. client asked if text on accordion tab (header) change color when been read (visited). although can apply pseudo-class :hover element, far can tell through research, can apply :visited <a> elements.

i've done thorough search , come nothing on topic @ all. or asking question wrong? guess there might way write custom jquery this, constrained use jquery ui accordion widget. question jquery ui accordions only. believe answer no.

if has idea, i'd grateful. again, accessed accordion tabs (accessed in past, user has moved on), not active accordion tabs.

here's standard accordion markup.

<div id="accordion">   <h3>research</h3>     <div>       <p>content here</p>     </div>   <h3>resources , guides</h3>     <div>       <p>content here</p>     </div>   <h3>regulations</h3>     <div>       <p>content here</p>     </div> </div> 

here's plain old jquery ui accordion script:

   jquery('#accordion').accordion({      collapsible: true,       active: false,       header: "h3",       heightstyle: "content"    }); 

here fiddle made it: http://jsfiddle.net/lera/ute3c/

i simple click function.

working example

$('#accordion').accordion({     collapsible: true,     active: false,     header: "h3",     heightstyle: "content" });  $('#accordion h3').click(function () {     $(this).addclass('newclass'); });  .newclass {     color:red; } 

Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -