Hi guys, Im creating a new theme and I would like to load the content of the different pages via ajax (I’ve been inspired by VEGA ). Are any tutorials available to help me with this? Thanks
Google basic jquery Ajax. It’s pretty easy if you already know some jquery. I can’t remember exactly what tutorial I started with, but within a day you’ve already got it.
Also lynda.com for extensive video tuts. My favourite
Thanks DDStudios, one more question : which jquery functions will I require to make something like I’m expecting…?
Basic Dom manipulation like changing a containers HTML upon loading and that sort of stuff. Showing an hiding loading gifs etc.
Please use Ajax, not post
Im currently using the .load() function but the problem that I have is that it loads only the html how can I also include the scripts and trigger them after the load() completes?
you could just put all your scripts on your index file. After the content loads just call the function.
For instance, if you’r eusing Cufon, once the user loads the page, after you put the new HTML in the container, just call Cufon again
- Exclusive Author
- Author has had an Item Featured
- Author was Featured
- Author had a File in an Envato Bundle
- Author had a Free File of the Month
- Sold between 50 000 and 100 000 dollars
- Has been a member for 4-5 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
Don’t use AJAX . It’s a royal pain to work with.
I’ve been fiddling around with the load() function for a day now and have found that it is really inconvenient when handling scripts. I need to use the orbit slider but Im unable to initialise if for pages loaded via load() function. @flashedge which method do you suggest? And congratulations for VEGA – its great!
Since most jquery plugins will load and target the elements needed for the plugin to work on dom-ready, all pages and elements that you later load with ajax will not be effected by this. Prepare for tons of support requests ;D