I am unsure where to put the code in reference to the above however. Sorry, I'm a newbie

Do I need to change my div id's to content/toggle?

I need all div's to hide when the DOM loads, have them slide toggle open when one clicks on them individually, and have their 'More Details' name change to 'Hide Details' when opened, and back to the former when closed.

Thanks again for a step by step.

Ash

Paul_Wilkins
—
2011-06-20T10:53:58Z —
#5

Ashley_Smith said:

I am unsure where to put the code in reference to the above however. Sorry, I'm a newbie

Do I need to change my div id's to content/toggle?

No, you don't need to change any of those.

Would you like some hand-holding in regards to the changes that you need to make?

Ashley_Smith
—
2011-06-20T11:00:27Z —
#6

Yes please, I think I'm just unsure where to place this function to call...

initSlickbox('#myContent', '#slick-toggle');

This is how it looks at the moment replacing code with yours minus the above...

If you're making changes the the contents of the initSlickbox function, then you're doing it wrong.

The initSlickbox function goes inside of the jQuery ready function. Immediately after the end of the initSlickbox function (but still inside of the jQuery ready function) is where you place the call to initCheckbox initializing it for the different pieces of content that you have.

Ashley_Smith
—
2011-06-20T11:27:10Z —
#10

Sorry, I really don't understand the terminology, it's over my head.

Could you kindly write out the working code for me. I think I can then follow it visually.

Cheers

Paul_Wilkins
—
2011-06-20T11:29:38Z —
#11

Ashley_Smith said:

Could you kindly write out the working code for me.

I would rather help you to understand what is going on here, so that you can come to learn more about how your code works.

This part that wraps around the jQuery code, is commonly referred to as a jQuery wrapper.

$(document).ready(function() {
...
});

It's purpose is to delay the execution of the code in the function, until after the DOM has loaded. At that time the script code in the function is then capable of working with the elements in the DOM.

Ashley_Smith
—
2011-06-20T11:50:44Z —
#16

Ah, I see. Sorry that's correct above. The code wasn't updating correctly on the website I'm using to test.