<SOLVED>CMSMS is "expanding" all my jQuery collapsible links

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
RyanC
Forum Members
Forum Members
Posts: 97
Joined: Fri Aug 05, 2011 9:02 pm

<SOLVED>CMSMS is "expanding" all my jQuery collapsible links

Post by RyanC »

Hi, I did this layout locally with just html and css and jquery. When I pasted it into CMSMS, it has all the collapsible stuff already expanded.

This is a link to the page:

All those boxes should be collapsed, but they are all open as a default. Is there something I could change so that when I load the page they are all collapsed by default like they were on my local machine? Also, is there a way to make the page collapse every time it's loaded? In the CMSMS page I have caching turned off but I don't think that's helping.

I know this a lot to ask, I'd really appreciate any help. Completely stumped. This jQuery code is something I got off the net, I didn't code it myself.

(removed)
Last edited by RyanC on Thu Apr 05, 2012 8:42 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: CMSMS is "expanding" all my jQuery collapsible links

Post by Dr.CSS »

Don't know if it helps but I get this...

line 1167 column 5 - Warning: A table row was 1 columns wide, which is less than the column count established by the first row (3).

I would put the jQuery stuff at the top in the <head> and use a full javascript tag for the function part which normally has...

<__script__ type="text/javascript">
$(document).ready(function(){
RyanC
Forum Members
Forum Members
Posts: 97
Joined: Fri Aug 05, 2011 9:02 pm

Re: CMSMS is "expanding" all my jQuery collapsible links

Post by RyanC »

Hi--

I don't know why it's like that but the jquery method I downloaded has the script at the bottom. If you put it at the top, it disables the functionality. It just becomes a dead link. I made a duplicate template for testing and it only works when it's at the bottom like that.

I don't understand why the page works perfectly fine hand coded--cmsms is doing something to it.

This is the link to where I got the script from:
https://github.com/danielstocks/jQuery-Collapse/
staartmees
Power Poster
Power Poster
Posts: 1049
Joined: Wed Mar 19, 2008 4:54 pm

Re: CMSMS is "expanding" all my jQuery collapsible links

Post by staartmees »

RyanC
Forum Members
Forum Members
Posts: 97
Joined: Fri Aug 05, 2011 9:02 pm

Re: CMSMS is "expanding" all my jQuery collapsible links

Post by RyanC »

Didn't know about that one. Thanks for the link, I'll check it out.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: CMSMS is "expanding" all my jQuery collapsible links

Post by Rolf »

- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
RyanC
Forum Members
Forum Members
Posts: 97
Joined: Fri Aug 05, 2011 9:02 pm

Re: CMSMS is "expanding" all my jQuery collapsible links

Post by RyanC »

Looks pretty good but I don't understand the install directions. The only modules I've installed have been through the CMSMS module manager. It says to put files in respective directories but I don't know what those are. Could someone give me more detailed (newbie) installation instructions so I could try it out? Thanks!
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: CMSMS is "expanding" all my jQuery collapsible links

Post by Rolf »

RyanC wrote:Looks pretty good but I don't understand the install directions. The only modules I've installed have been through the CMSMS module manager. It says to put files in respective directories but I don't know what those are. Could someone give me more detailed (newbie) installation instructions so I could try it out? Thanks!
It has been a while, but...
Put the the function.toggle_start.php and function.toggle_end.php file in the plugins folder.
The remaining folder "toggle" with jquery and images files etc. you copy in to the lib folder of your website.
You can read the help text when you look under Tags in your Admin. It is a tag and not a module.

In page or template:

Code: Select all

{toggle_start title="Your Name 1" width="440px"}
Content 1
{toggle_close}

{toggle_start title="Your Name 2"}
Content 2
{toggle_close}
Hope this helps,
Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
RyanC
Forum Members
Forum Members
Posts: 97
Joined: Fri Aug 05, 2011 9:02 pm

Re: CMSMS is "expanding" all my jQuery collapsible links

Post by RyanC »

Ok thanks for that info Rolf, Hopefully I'll be able to try that out today.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: CMSMS is "expanding" all my jQuery collapsible links

Post by Dr.CSS »

I ended up using the jquery UI accordion method...

<__script__ type="text/javascript" src="uploads/jq/jquery162.js"></__script>
<__script__ type="text/javascript" src="uploads/jq/ui.js"></__script>
<__script__ type="text/javascript">
$(document).ready(function(){
$('.togle').accordion({header: 'h4',autoHeight: false,collapsible: true,});
$('.togle').accordion('activate', first);
});
</__script>

Here...

http://www.cantinastrella.com/over-ons/ ... rella.html
RyanC
Forum Members
Forum Members
Posts: 97
Joined: Fri Aug 05, 2011 9:02 pm

Re: CMSMS is "expanding" all my jQuery collapsible links

Post by RyanC »

Thanks for the help guys. I actually was able to get that toggle option working, but it isn't right for this site. I think there's too much content in my tables to make it useful... and the css is too confusing. But I can see myself using it eventually for something else.

So I'm going to marked this as solved, until I become a better coder and understand scripting better I'm just going to keep what I set up as a static page.
Post Reply

Return to “Layout and Design (CSS & HTML)”