I am working on a WP site with many custom templates for pages and headers. On this page, for "simplicity" I wanted to have the three content blurbs (strategy, marketing, and writing) in the same page file (editable in the same Page on the dashboard). At present, the following javascript is letting me hide and show the three blurbs according to which nav button is clicked:
function HideAllShowOne(d) {
// Between the quotation marks, list the id values of each div.
var IDvaluesOfEachDiv = "entry_strat entry_mark entry_writ";
//-------------------------------------------------------------
IDvaluesOfEachDiv = IDvaluesOfEachDiv.replace(/[,\s"']/g," ");
IDvaluesOfEachDiv = IDvaluesOfEachDiv.replace(/^\s*/,"");
IDvaluesOfEachDiv = IDvaluesOfEachDiv.replace(/\s*$/,"");
IDvaluesOfEachDiv = IDvaluesOfEachDiv.replace(/ +/g," ");
var IDlist = IDvaluesOfEachDiv.split(" ");
for(var i=0; i<IDlist.length; i++) { HideContent(IDlist[i]); }
ShowContent(d);
}
My question: Is there a way for the url to dictate which div(one of three paragraphs) is displayed? That way, the links from other pages can point to any one of the three instead of always to the first one (strategy). Here's the page:
http://lindastephens.net/strat-mark-writ
Any input would be MUCH appreciated! Thanks, Leah