Page 1 of 1
[module] StartExpandCollapse
Posted: Thu Sep 22, 2011 10:07 pm
by janvl
Hi,
this is just a question.
I have just installed the module "comment" on 19.4.3 and saw that it uses the tags StartExpandCollapse and StopExpandCollapse.
In 1.10 they are removed. One can expect problems with more modules I guess. Is there already an alternative and/or workaround?
I know it is not core but with beta 3 one can start thinking about things like that.
Kind regards,
Jan
Re: StartExpandCollapse
Posted: Thu Sep 22, 2011 10:14 pm
by calguy1000
With jQuery being shipped with CMSMS there is no need to include tags for expandCollapse..
it's as trivial as (something like:)
{cms_jquery} {* in the header *}
EDIT: I fixed a problem I saw in my typing but still haven't tested this.
Code: Select all
<__script__ type="text/javascript">{literal}
$(document).ready(function){
$('.toggle').click(function(){
var rel = $(this).attr('rel')
$('.area').hide();
$('#'+rel).show();
});
});
{/literal}</__script>
<div class="toggle" rel="box1">expand a</div>
<div class="area" id="box1">abcdefg</div>
<div class="toggle" rel="box2">expand b</div>
<div class="area" id="box2">foo bar</div>
Re: StartExpandCollapse
Posted: Thu Sep 22, 2011 10:20 pm
by janvl
Thank you !
Kind regards,
Jan
Re: StartExpandCollapse
Posted: Fri Sep 23, 2011 1:33 am
by JeremyBASS
Passing by and I wanted to point out two things here, first there is .slideToggle() in jquery which can be used, but there is a bouns with the new {cmsms_jquery}. You load the the jQuery UI lib with the default tag, so this is all you need
(note: I like using the cdn)
Code: Select all
<__html><head>
{cms_jquery cdn=true} {* in the header *}
<__script__ type="text/javascript">{literal}
$(function() {
$( "#accordion" ).accordion({
collapsible: true
});
});
{/literal}</__script>
</head></__body>
<div id="accordion">
<h3><a href="#">First header</a></h3>
<div>First content</div>
<h3><a href="#">Second header</a></h3>
<div>Second content</div>
</div>
<__body></__html>
so really there is alot of power for sure
Just thought I'd share. Have fun..
Cheers -Jeremy
Re: StartExpandCollapse
Posted: Fri Sep 23, 2011 1:20 pm
by Rolf
janvl wrote:In 1.10 they are removed. One can expect problems with more modules I guess.
It won't break excisting websites, because during an upgrade no files are deleted!
grtz. Rolf
Re: StartExpandCollapse
Posted: Fri Sep 23, 2011 2:59 pm
by calguy1000
Your best bet is to contact the author to make sure that he makes the appropriate changes.
I would expect it's as simple as a template change anyways.