Page 1 of 1

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

Posted: Thu Apr 05, 2012 1:47 am
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)

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

Posted: Thu Apr 05, 2012 2:54 am
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(){

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

Posted: Thu Apr 05, 2012 3:40 am
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/

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

Posted: Thu Apr 05, 2012 7:34 am
by staartmees

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

Posted: Thu Apr 05, 2012 3:05 pm
by RyanC
Didn't know about that one. Thanks for the link, I'll check it out.

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

Posted: Thu Apr 05, 2012 3:42 pm
by Rolf

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

Posted: Thu Apr 05, 2012 4:23 pm
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!

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

Posted: Thu Apr 05, 2012 4:41 pm
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

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

Posted: Thu Apr 05, 2012 4:58 pm
by RyanC
Ok thanks for that info Rolf, Hopefully I'll be able to try that out today.

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

Posted: Thu Apr 05, 2012 8:15 pm
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

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

Posted: Thu Apr 05, 2012 8:41 pm
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.