logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > Javascript and JS frameworks
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 07-22-2013, 07:45 AM   #1
indianleo
 
Join Date: Sep 2006
Posts: 343
Default Change class of active header of accordian

Hi Friends I had created one accordian now I want to change class of active header
I want to change class of Active hr from header to active-header in javascript pls do guide me
Code

<script type="text/javascript">
$(document).ready(function() {
$("#accordion .header").click(function() {
if($(this).next("div").is(":visible")){
$(this).next("div").slideUp("slow");
} else {
$("#accordion .content").slideUp("slow");
$(this).next("div").slideToggle("slow");
}
});
});
</script>

<div id="accordion">
<h3 class="header">Header</h3>
<div class="content">
Content
</div>
<h3 class="header">Header</h3>
<div class="content">
Content
</div>
</div>

Last edited by indianleo; 07-22-2013 at 07:49 AM..
indianleo is offline   Reply With Quote
Old 07-22-2013, 08:26 AM   #2
indianleo
 
Join Date: Sep 2006
Posts: 343
Default

Please need help urgently
indianleo is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:29 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com