Page 1 of 1

collapsible collapsing when it shoudn't..

Posted: Thu Jan 30, 2014 3:37 pm
by Victor Fagerström

I have a problem with collapsible item. I dynamically create simple collapsibles using a query service. I want all of the collapsible to be NOT collapsed when they are loaded. Now, no matter if I leave the "collapsed" option unchecked or add data-collapsed="false" to the object it doesn't work, all collapsibles at collapsed when created and shown...

Just creating one collapsible without adding more collapsibles dynamically works as expected.

solution?

V


collapsible collapsing when it shoudn't..

Posted: Thu Jan 30, 2014 5:31 pm
by Kateryna Grynko

Hi Victor,

Add this code on service Complete event:preAppery("mobilecollapsibleset").find("[data-role=collapsible]").each(function(){$(this).trigger("collapse");});/preWhere 'mobilecollapsibleset' is a name of collapsibleset component.


collapsible collapsing when it shoudn't..

Posted: Thu Jan 30, 2014 5:51 pm
by Victor Fagerström

No luck, problem remains with the code. Wouldn't that code COLLAPSE all? I'm looking to "open"/"uncollapse" every collapsible. Your code talks about a collapsibleSET which meaning is to always show only one of the collapsibleITEMS at a time. That's why I think the standard element collapsible (not collapsibleSET) is more likely too be modified? I could use any of the elements (single or set), but would prefer single.


collapsible collapsing when it shoudn't..

Posted: Thu Jan 30, 2014 8:07 pm
by Kateryna Grynko

Victor,

Then a small change needed:pre$("[data-role=collapsible]").each(function(){$(this).trigger("collapse");});/pre


collapsible collapsing when it shoudn't..

Posted: Tue May 06, 2014 3:18 am
by lorenzo

how to I apply this code on a particular dsid?
for example on mobilecollapsblock_943?
tried this but it did not work...
Appery("mobilecollapsblock_943").find("[data-role=collapsible]").each(function(){$(this).trigger("collapse");});


collapsible collapsing when it shoudn't..

Posted: Wed May 07, 2014 9:52 am
by Evgene Karachevtsev

Hello Lorenzo,

Try to use such javascript code: code $("[name='mobilecollapsblock_22']").collapsible("collapse"); /code


collapsible collapsing when it shoudn't..

Posted: Wed May 28, 2014 7:29 am
by lorenzo

Sorry the code doesnt work for me...
Ived tried this

$("[name='mobilecollapsblock_187']").collapsible ['(data-collapse="true")'];
but it also doesnt work.....


collapsible collapsing when it shoudn't..

Posted: Wed May 28, 2014 7:36 am
by lorenzo

I also tried this one

$("[name='mobilecollapsblock_88']").collapsible (['(data-collapse="true")']);

this one doesnt have warning errors, but unfortunately it also doesnt work for me...


collapsible collapsing when it shoudn't..

Posted: Wed May 28, 2014 2:41 pm
by Evgene Karachevtsev

Hello Lorenzo,

This code will close all opened collapsible blocks:

code$("[data-role=collapsible]").collapsible("collapse");/code


collapsible collapsing when it shoudn't..

Posted: Wed May 28, 2014 2:41 pm
by Illya Stepanov

Hi Lorenzo,

This code will close all opened collapsible bloks:
precode
$("[data-role=collapsible]").collapsible("collapse");
/code/pre