Jump to content
Sign in to follow this  
bonngean

How do I add a collapse drop down feature?

Recommended Posts

bonngean

Thanks for the suggestion @Peterluit, but I don't want to use a plugin. A plugin doesn't give me the freedom I want. I want to do this using a hook with Pagelines Pro and I know it can be done. I just need to know how to do it within an HTML table.

Share this post


Link to post
Share on other sites
bonngean

Hi Catrina, Thanks for the suggestion, but this looks like it's done with css only... Am I right? My new PLR site at: http://www.plrproductions.com/about/bonnie-gean/ uses a hook to pull down the rest of my bio page. However, as per my initial question, I now wanted to offer something that resembled what was on this page: http://www.nativeremedies.com/ailment/water-retention-causes.html#question3'>http://www.nativeremedies.com/ailment/water-retention-causes.html#question3 Specifically, I want to be able to use the functions.php feature of Pagelines pro to create a hook that allows: 1. An HTML table within my content area. 2. The HTML to collapse when it's not in use. 3. The ability to use OPEN and CLOSE text features. 4. The stacking feature - JUST as it does on this page. I have a GAMER site where the gamers offer "costume" ideas for their characters. I tried implementing the same code to this gamer site, as I did my PLR site -- but they have so many different variations of costumes, I couldn't get it to work properly. Here's the code I used for my PLR bio:

	/*ADD DROPDOWN CONTENT*/
	add_action ('wp_head','js_additions');
	
	function js_additions(){?>
	
	
	
The corresponding CSS for this hook is:
	/*DROP DOWN CONTENT*/
	p.toggle {color: #003366;font-size: 14px;text-decoration: none;}
	p.toggle:hover {text-decoration:underline;}
	.toggle_content {display:none;font-size:14px; text-decoration:none;}
	

If possible, I would like to know -- how can I craft the collapsing HTML table shown on this page, within my main content area of Pagelines Pro without resorting to a plugin or strictly CSS? http://www.nativeremedies.com/ailment/water-retention-causes.html#question3'>http://www.nativeremedies.com/ailment/water-retention-causes.html#question3 Can this be done by modifying the HOOK I have shown you here? If so... what's the best course of action for me to take to get the results I want? Thanks for any help you can provide.

Share this post


Link to post
Share on other sites
catrina

I don't think the collapsing can be done without CSS or Javascript (using just code or a plugin). If the collapsing effect going to show, it will need Javascript of some kind. I tried searching for a way, but the results keep mentioning use of CSS or some kind of plugin download.


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
bonngean

Catrina, I don't mind using the Javascript or CSS (see my code above, it has both)... to create the collapse/drop down I want to do. I just don't want to use a plugin. I'd rather do what needs to be done with a HOOK. I keep getting the feeling you're not understanding what I'm asking. LOL Taking the code I'm showing above, which already takes HIDDEN content and shows it when clicked on. Using similar coding for a HOOK in Pagelines Pro, can I create the same type of drop down/collapse feature as shown on this website page: http://www.nativeremedies.com/ailment/water-retention-causes.html#question3 Using Javascript is OK -- Using CSS is OK -- using a plugin is not.

Share this post


Link to post
Share on other sites
cmunns

You would add some jquery using a hook: http://api.jquery.com/slideToggle/ Then you could even go as far as to making a shortcode in the functions file to allow users to do this themself with something like [toggle title="title"]content[/toggle]

Share this post


Link to post
Share on other sites
bonngean

Thanks Adam! This is exactly what I needed!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×