Hi,
I have a sort of catalogue section of my site made of a few pages, one for each category in my catalogue (tables, chairs, lighting, etc).
Each one of these pages has a spry accordion, which looks the same on all the pages.
When I click on the Accordion panel tab, the Accordion panel content (for that category) shows up, which is fine.
But when I click on the Accordion's panel tab, I would like, first for that page to show up, and then for the accordion panel content to show up.
This is what's happening:
Say I am on the TABLES page. When I click on the accordion panel tab "CHAIRS" the accordion panel content with the various types of chairs opens/shows, but I am still in the TABLES page.
I would like this to take me to the CHAIRS page without having to choose one of the panel contents sub-items.
I can't seem to be able to do it with a simple link.
What else do I need to do?
Thanks.
Is this what you want to do http://backyardfurniture.com.au/? See the accordion panel used for the menu on the left.
Gramps
It looks like you have to attach an onclick event (see below)
At the moment your code most probably looks something like:
<div class="AccordionPanel">
<div class="AccordionPanelTab">Chairs</div>
</div>
You need to wrap the AccordionPanelTab <div> in an anchor tag like below:
<div class="AccordionPanel">
<a href="chairs.html" onclick="window.location=this.href;return false;">
<div class="AccordionPanelTab">Chairs</div>
</a>
</div>
Ok, I think that did it, thanks.
Would you mind explaining what that line of script (javascript?) means?
Next problem, now I get an underline on my "new" link.
My AccordionPanelContent links should have an underline, which they do. But not the AccordionPanelTab links.
I had created this pseudo class, with no underline:
.AccordionPanelTab a:link
.AccordionPanelTab a:visited
.AccordionPanelTab a:hover
.AccordionPanelTab a:active
but it's not working, the AccordionPanelTab link shows underlined.
Can you help?
graphimatic wrote:
Would you mind explaining what that line of script (javascript?) means?
Its just saying when the link is clicked go to the specified page.
graphimatic wrote:
Ok, I think that did it, thanks.
Would you mind explaining what that line of script (javascript?) means?
Next problem, now I get an underline on my "new" link.
My AccordionPanelContent links should have an underline, which they do. But not the AccordionPanelTab links.
I had created this pseudo class, with no underline:
.AccordionPanelTab a:link
.AccordionPanelTab a:visited
.AccordionPanelTab a:hover
.AccordionPanelTab a:active
Try adding:
.AccordionPanel a {
text-decoration: none;
}
Hi I am trying to do the same thing. Open a page when I click on a tab and have the tab open at the same time.
I changed my code to the following.
<a href="../cfpage.php" onclick="window.location=this.href;return false;">
<div class="AccordionPanel">
<div class="AccordionPanelTab">CFPage</div>
<div class="AccordionPanelContent"><br />
<p><a href="../Bpage.php">BPage</a></p>
<p><a href="../Dpage.php">Dpage</a></p>
<p><a href="../Jpage.php">Jpage</a></p>
<p><a href="../J2page.php">J2page</a></p>
</div>
</div>
</a>
So when I click the tab CFPage the pannel opens then it changes to the cfpage.php and the accordian closes. I would like it to keep the accordion open when it changes the page.
Also when I am in in split view (dw cs5) I am seeing the </a> tag in the design view in a few places. when I click on the </a> tag in code view I am being told it is being marked as invalid markup because it doesn't belong inside the tag its in.
Thanks in advance for you help
whichrtmej
North America
Europe, Middle East and Africa
Asia Pacific