Re: Opening specific panel in accordion bootstrap when there is a bookmark in it
Posted: Wed Feb 26, 2020 6:36 pm
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
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
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>
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">