I copied this script for a pop open box to use for some content on my personal website. No understanding JS , i was wanting to know if it's possible to add an "active" class to the span class i have labled MANAGE , so i can style it when the content is open. I have tried to use :active in my css but its not working, so i assume its needs added to this script.
<div id="login_buttons">
<span id="loginlink" class="readmore_jq">MANAGE</span><div class="hide1"><module name="MESSAGE2"/></div>
</div>
<script type="text/javascript">// <![CDATA[
$(document).ready(function(){
$('.hide1').hide();
$('.readmore_jq').click(function(){
var t = $(this);
t.next().toggle('slow');
});
});
// ]]></script>
EDITED: i set up in jsfiddle to try all the answers, and still nothing working to get normal and active state http://jsfiddle.net/dEcFL/5/