Okay, you need to explain what you want it to do a little more. The code I gave
you starts with one div open and the other closed. I am not sure if spry is
going to be necessary with this. Start with just the divs and no spry. Use the
same CSS if you want the style to be the same.
If you want the text to not show, don't add the class.
If you need it to open it again, the code would be a little different:
function UpDown(el){
if( $(el).hasClass(".open") ){
$(el).slideUp();
$(el).removeClass("open");
}
else{
$(".open").slideUp();
$(".open").removeClass("open");
$(el).addClass("open");
$(el).slideDown();
}
}
The above code changes it to check if it is closed, open it. If it is open,
close it.
Also, I suggest if you are starting to do UI stuff, I suggest learning jQuery.
See how little code is needed for this function? And the base document
(jquery.min.js) is tiny.
> So I implemented the js into the picture and added your code. Aside
> from the additional paran I added in the onclick - the code is
> identical and not quite working. First - I need the text to not show
> initially upon creating the accordion. Then the 2nd issue - it seems
> to close the text, but not open. I really appreciate the help. I've
> never used jquery.js. Seems to be something I should learn.
>
> Kim
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328877
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4