...

View Full Version : Simplify this for me please



dododidi
11-19-2010, 07:21 PM
hi guys,
can someonr put this into an array for me please--don't know much about js.. much obliged for your help

btw...when I call the site from google, the divs are open but when I call the site from my browser address bar...the divs are hidden as should be (only in firefox, otherwise great.

Any ideas why that might be)

thanks a ton
DD


jQuery(document).ready(function() {
jQuery(".content").hide();
//toggle the componenet with class msg_body
jQuery(".headinga").click(function()
{
jQuery(this).next(".content").slideToggle(500);
});
});
jQuery(document).ready(function() {
jQuery(".content").hide();
//toggle the componenet with class msg_body
jQuery(".headingb").click(function()
{
jQuery(this).next(".content").slideToggle(500);
});
});
jQuery(document).ready(function() {
jQuery(".content").hide();
//toggle the componenet with class msg_body
jQuery(".headingc").click(function()
{
jQuery(this).next(".content").slideToggle(500);
});
});

Old Pedant
11-19-2010, 09:58 PM
PURE GUESS.


jQuery(document).ready(function() {
jQuery(".content").hide();
//toggle the componenet with class msg_body
jQuery(".headinga").click(function()
{
jQuery(this).next(".content").slideToggle(500);
});
//toggle the componenet with class msg_body
jQuery(".headingb").click(function()
{
jQuery(this).next(".content").slideToggle(500);
});
//toggle the componenet with class msg_body
jQuery(".headingc").click(function()
{
jQuery(this).next(".content").slideToggle(500);
});
});

Could surely be even simpler, but that should work.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum