Hey all,
I'm having issues adding a javascript menu into the column_left.tpl file.
I keep entering the code and when I upload it is just text with no javascript.
Help please.
Code: Select all
<script src="../../../../../../SpryAssets/SpryAccordion.js" type="text/javascript"></script>
<link href="../../../../../../SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
<div id="column_left">
<div id="Accordion1" class="Accordion" tabindex="0">
<div class="AccordionPanel">
<div class="AccordionPanelTab">Label 1</div>
<div class="AccordionPanelContent">Content 1</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab">Label 2</div>
<div class="AccordionPanelContent">Content 2</div>
</div>
</div>
</div>
<script type="text/javascript">
var Accordion1 = new Spry.Widget.Accordion("Accordion1");
</script>
place this in your header file
<script src="../../../../../../SpryAssets/SpryAccordion.js" type="text/javascript"></script>
<link href="../../../../../../SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
remove ../ and use absolute path from root. infact, look how the others are placed and copy the same structure.
Leave the rest as it is for column_left.tpl
have no idea why it doesnt upload as code, and just text, perhaps your js file is some how breaking the code.
<script src="../../../../../../SpryAssets/SpryAccordion.js" type="text/javascript"></script>
<link href="../../../../../../SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
remove ../ and use absolute path from root. infact, look how the others are placed and copy the same structure.
Leave the rest as it is for column_left.tpl
have no idea why it doesnt upload as code, and just text, perhaps your js file is some how breaking the code.
Who is online
Users browsing this forum: No registered users and 9 guests