[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
www.dhtmlgoodies.com • View topic - Sliding show/hide script - two class names
Page 1 of 1

Sliding show/hide script - two class names

PostPosted: Sun Feb 28, 2010 9:33 pm
by mobrains
Hi, I've been using the show/hide script given here:

http://www.dhtmlgoodies.com/index.html? ... tent_slide

but I have two different sizes of buttons on my site, as some have longer text in, which needs to wrap round.
I have made a new class name, dhtmlgoodies_question_big, and set up the CSS so it displays correctly, but obviously without calling it, the Javascript isn't going to work.

Does anybody know how to add a second class name to this section of the script on the above page:

for(var no=0;no<divs.length;no++){
if(divs[no].className=='dhtmlgoodies_question'){


(It's right near the end of the script).

I tried
if(divs[no].className=='dhtmlgoodies_question')or(divs[no].className=='dhtmlgoodies_question_big'){

as well as other things I could think of, but I know little about Javascript, and this is one of those things that is apparently very difficult to search for on Google, due to the term "className" coming up a lot, but not in the context I was searching for.

Any help would be very much appreciated.

PostPosted: Tue Mar 02, 2010 12:07 pm
by mobrains