thugsr Posted August 10, 2012 Share Posted August 10, 2012 Hi there, i'm wondering if this may be done somehow? Basically i have side navigation and i want to open links from it to central content div, so everything would be on same page. I hope that you understand what i am asking? Thank in advance. In attachment is image of how i imagind it. Quote Link to comment https://forums.phpfreaks.com/topic/266897-navigation-links-opens-in-one-div/ Share on other sites More sharing options...
chopsumbongw Posted August 10, 2012 Share Posted August 10, 2012 What you need is asynchronous loading of data! I believe you can get the job done with JavaScript/jQuery Try this. 1) Add the latest jQuery library to your project 2) Create separate pages for the content you would like to put in the main div. 3) Use "click" function to trigger "load" function. You can look up the exact syntax as it would be good if your read up on it. It is freely available on the interenet. click - http://api.jquery.com/click/ load - http://api.jquery.com/load/ Using above concept you can write a few lines of script to load a particular html file into a div. It would make sense to use $(window).load so that you dont slow down the loading of you page. Cheers Quote Link to comment https://forums.phpfreaks.com/topic/266897-navigation-links-opens-in-one-div/#findComment-1368318 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.