Page 2 of 2

Re: Opening specific panel in accordion bootstrap when there is a bookmark in it

Posted: Wed Feb 26, 2020 6:36 pm
by DarioMartin
Yes, selected it as the bookmark in the menu. have just given myself a crash course on jQuery to better understand the statements.
This is the declaration between <head> tags

Code: Select all

<script>
$(document).ready(function()
{
   var hash = window.location.hash;
   var anchor = $(hash); 
  
   if (anchor.length > 0)
   {
      anchor.click();
   }  
});
</script>
I put debug alerts in the code. anchor.length returns 1 and the contents of "hash" returns "#IR". This is the bookmark I have selected in the menu.
The id of the layer is "IR" in the accordion.

These are the first six lines of the generated accordion code

Code: Select all

<div id="wb_Accordion1">
<div id="Accordion1">
<h3>Terapia de calor Infra Rojo</h3>
<div>
<div id="IR">
<div id="IR_Container">

Re: Opening specific panel in accordion bootstrap when there is a bookmark in it

Posted: Wed Feb 26, 2020 6:54 pm
by Pablo
This seems to be correct.

Re: Opening specific panel in accordion bootstrap when there is a bookmark in it

Posted: Thu Feb 27, 2020 10:14 am
by DarioMartin
Beings my accordion is itself set within a layer which displays in the content place holder of a master page, I also did a very very simple "site" using only two basic pages to see if it was the layout of my site causing issues; one page with nothing but a simple text menu, one with a straight accordion on the page and the same menu on the accordion page and I left debug alerts in the code.

In one panel of the accordion I put a bookmark, and selected that bookmark in the menu by its native name "Bookmark1" and in the next panel I put a Layer, and in the menu, selected the bookmark "Layer1"

Panel would not open at all using either of the menus. Using the "debug" alerts I could see the correct names being passed through : "#Bookmark1" and "#Layer1", but panel(s) did not open. I am using WB 15.3.0

This would be really really useful - is there any chance it could be implemented in a future version of WebBuilder??

Re: Opening specific panel in accordion bootstrap when there is a bookmark in it

Posted: Thu Feb 27, 2020 10:55 am
by Pablo
You can post suggestions here:
https://www.wysiwygwebbuilder.com/forum ... m.php?f=28

If more users find this useful, then I will consider it for future development.

Re: Opening specific panel in accordion bootstrap when there is a bookmark in it

Posted: Thu Feb 27, 2020 12:17 pm
by DarioMartin
Posted - thanks again for the time you've given me.