Are there any js/jquery scripts out there like this one:
A left menu that changes the content on the right, with the ability to search it.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Someone posted almost this exact question a few minutse ago and then deleted the post before I could submit my answer. Was that you? Either way, I’ll skip the bitching and just answer your question.
Here goes.
Assuming that you want to just update the visible contents or your page without loading a different one (either fully or through AJAX), you could accomplish this with a simple “tab” script — just think of your left sidebar menu as a folder’s tabs, with the contents of the folder being on the right.
We’ll call your left sidebar’s menu the “tab console” and your right-side main container the “tab pane.”
Let’s say your tab console’s html looks something like this:
… and your tab pane’s lookw like this:
You would need to hide the various tab pane contents, so they don’t all show at once. You can do this with CSS:
Now we need a script to make it all work:
That’s the basic idea, anyway. I would suggest reading an introductory tutorial to jquery if you are confused about any of this.
EDIT – I should add that the example posted this time uses ajax requests. You can read the jquery documentation and change the code where applicable. It’s just as simple, if not more, to load content into your pane as it is to show static content.
The jquery UI library offers a built-in tab plugin, but it’s rather cumbersome and, in my opinion, pretty pointless when it’s so simple to write your own solution.