I also tried a variation of your suggestion:
<script>
$(document).bind("onAfterViewPanelSwitch.exhibit", function(event, i,
view) {
document.getElementById('timeline_summary').style.display=='none';
document.getElementById('map_summary').style.display=='none';
switch (i) {
case 1:
document.getElementById('timeline_summary').style.display=='block';
break;
case 2:
document.getElementById('map_summary').style.display=='block';
break;
}
});
</script>
but this also did not work...
On Thursday, April 2, 2015 at 11:57:45 AM UTC-5, [email protected] wrote:
>
> No error that I see. I also tried using a simplified example (my same
> content, but with everything except the views stripped out), but I got the
> same result.
>
>
>
>
>
> On Thursday, April 2, 2015 at 9:14:44 AM UTC-5, Luis Miguel Morillas wrote:
>>
>> Hmmm. It works for me on a simplified example. I'll review your code
>> later. Does it raise some kind of error?
>> Saludos,
>>
>> -- luismiguel (@lmorillas)
>>
>>
>> 2015-04-02 16:10 GMT+02:00 <[email protected]>:
>> > Hmmm... Thanks for taking the time to write this up, but it doesn't
>> seem to
>> > work for me. I copied the script to the head and renamed the divs with
>> > appropriate IDs, but the behavior is still the same.
>> >
>> > On Thursday, April 2, 2015 at 3:47:04 AM UTC-5, Luis Miguel Morillas
>> wrote:
>> >>
>> >> I think this should work:
>> >> # Add before a new id to the divs you want to show/hide (#sm and #st
>> >> in my example)
>> >>
>> >> <script>
>> >> $(document).bind("onAfterViewPanelSwitch.exhibit", function(event,
>> >> i, view) {
>> >> $("#st").hide(); // divs you want to hide: summary timeline
>> >> $("#sm").hide(); // id for summary map
>> >> switch (i) {
>> >> case 1:
>> >> $("#st").show(); // id of the second view
>> >> break;
>> >> case 2:
>> >> $("#sm").show(); // id of the third view
>> >> break;
>> >> }
>> >> });
>> >> </script>
>> >>
>> >>
>> >> Best,
>> >>
>> >> -- luismiguel (@lmorillas)
>> >>
>> >>
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups
>> > "SIMILE Widgets" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> an
>> > email to [email protected].
>> > To post to this group, send email to [email protected].
>> > Visit this group at http://groups.google.com/group/simile-widgets.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>
--
You received this message because you are subscribed to the Google Groups
"SIMILE Widgets" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/simile-widgets.
For more options, visit https://groups.google.com/d/optout.