Victor Fagerström
Posts: 0
Joined: Sun Dec 01, 2013 1:03 pm

collapsible collapsing when it shoudn't..

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

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

collapsible collapsing when it shoudn't..

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.

Victor Fagerström
Posts: 0
Joined: Sun Dec 01, 2013 1:03 pm

collapsible collapsing when it shoudn't..

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.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

collapsible collapsing when it shoudn't..

Victor,

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

lorenzo
Posts: 0
Joined: Fri Feb 08, 2013 3:50 am

collapsible collapsing when it shoudn't..

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");});

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

collapsible collapsing when it shoudn't..

Hello Lorenzo,

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

lorenzo
Posts: 0
Joined: Fri Feb 08, 2013 3:50 am

collapsible collapsing when it shoudn't..

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

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

lorenzo
Posts: 0
Joined: Fri Feb 08, 2013 3:50 am

collapsible collapsing when it shoudn't..

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...

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

collapsible collapsing when it shoudn't..

Hello Lorenzo,

This code will close all opened collapsible blocks:

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

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

collapsible collapsing when it shoudn't..

Hi Lorenzo,

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

Return to “Issues”