Hi everybody, i don't know if it's right to write here this kind of problem, so i try ..
I'd like to insert a javascript effect in my WordPress template, in such a way that it is possible to click on menu items and change only a DIV just after the menu.
I'll try to explain better what i mean.
I have a menu with this kind of links
<a href="javascript:;" onmousedown="toggleDiv('slickbox');" title="Browse the archives">browse</a>,
toggleDiv is a call to a javascript function, which is the following:
function toggleDiv(divid){
if(document.getElementById(divid).style.display == 'none'){
document.getElementById(divid).style.display = 'block';
}else{
document.getElementById(divid).style.display = 'none';
}
}
.This function takes the divid parameter, finds the DIV with this id attribute and makes it visible. The DIV code is the following:
<div id="about" style="display:none;">
<div id="slickcats">
<ul id="script" class="headcats">
HERE WILL BE SOME TEXT
</ul>
</div>
</div>
.
I have downloaded the "Improved Include Pages" plugin, that allows me to include the content of a page in another one adding a string like this:<?php iinclude_page(11); ?>.
My target is to have a DIV in my home page that changes its content dinamycally with the link a click, and this content are the pages. But i don't know how to do.
Now i have as many DIVs as the links in my menu, but i'd like to have only one DIV that dinamically changes.
There's someone who can help me?
Thanks!