What’s the best way to target a particular <div> with a selection from a menu using php?
Specifically, I want to have a link selected from a menu contained in div id=menu loaded in div id=content.
I can see this has been discussed in here, but I can’t seem to find a clear answer. So, my apologies if this is rehashing an old topic, but I gather that I need to use ajax for this, or can it be done with php only? Are there any good examples or tutorials available?
Thanks
You’ll probably need AJAX and a bit of magic.
HTML
JavaScript (with jQuery)
I haven’t tested this, but it should work. Basically you want to bind to all the links within
#menuand when one is clucked load the href into#contentvia an AJAX call.