Menu icon Foundation
F6.3 Reveal (multiple_opened) use case

Not a githubber so herewith a bug report:

document with multiple .reveal (first without multiple_opened but all subsequent <div>)

 

<div id="reveals">

<div id="reveal0" class=".reveal"/>

<div id="reveal1" class=".reveal" data-options="multipleOpened=true;"/>

<div id="reveal1" class=".reveal" data-options="multipleOpened=true;"/>

</div>

<div id="reveal2" class=".reveal" data-options="multipleOpened=true;"/>

page redirect where the new document structure -

<div id="reveals"/>

<div id="reveal2" class=".reveal" data-options="multipleOpened=true;"/>
$("#reveals).load([original document], "#reveals .reveal", function(){
$(this).foundation();
});
$("#reveal0").foundation("open");
$("#reveal2").foundation("open");

"#reveal2" opens under "#reveal0" because the chaining of ".reveal" elements 'missed' the previously initialised "#reveal2"

 

Workaround is to 'rebuild the ".reveal" chain -

$("#reveal2").foundation("destroy");
$(".reveal").foundation();

 

Reveal F6 F6.3 destroy reinit reinitialise reinitialise multiple

Not a githubber so herewith a bug report:

document with multiple .reveal (first without multiple_opened but all subsequent <div>)

 

<div id="reveals">

<div id="reveal0" class=".reveal"/>

<div id="reveal1" class=".reveal" data-options="multipleOpened=true;"/>

<div id="reveal1" class=".reveal" data-options="multipleOpened=true;"/>

</div>

<div id="reveal2" class=".reveal" data-options="multipleOpened=true;"/>

page redirect where the new document structure -

<div id="reveals"/>

<div id="reveal2" class=".reveal" data-options="multipleOpened=true;"/>
$("#reveals).load([original document], "#reveals .reveal", function(){
$(this).foundation();
});
$("#reveal0").foundation("open");
$("#reveal2").foundation("open");

"#reveal2" opens under "#reveal0" because the chaining of ".reveal" elements 'missed' the previously initialised "#reveal2"

 

Workaround is to 'rebuild the ".reveal" chain -

$("#reveal2").foundation("destroy");
$(".reveal").foundation();