I want to load the content of various cms made simple pages, regular pages and pages from the gallery module, with ajax.
I've installed the ajax plug-in but I dont know any Javascript or jquery and don't know how to use the functions to call the content.
could anyone please give me an example of how to do this?
thanks in advance
load content with Ajax
Re: load content with Ajax
I did do this once, and after a lot of fiddling and research, got it to work. Once done, however, I realized two important things: You lose out on SEO (as the site really has just one page) and you can't take advantage of caching.
Mainly I was just going after the 'pretty' factor anyway, so I faked it with a fadein, as seen on http://www.matthornsby.ca:
Mainly I was just going after the 'pretty' factor anyway, so I faked it with a fadein, as seen on http://www.matthornsby.ca:
Code: Select all
<__script__ type="text/javascript">
$(document).ready(function () {ldelim}
$('#inside-content').fadeIn(1000);
{rdelim});
</__script>
Re: load content with Ajax
Take a look at jQuery load function it is very simple and you can load specific content based upon it's id.