46 posts
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 1 000 and 5 000 dollars
Codename says

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 :)

2952 posts
  • Attended a Community Meetup
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
  • Bought between 100 and 499 items
  • Contributed a Blog Post
  • Elite Author
  • Exclusive Author
+5 more
DDStudios says

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 ;)

46 posts
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 1 000 and 5 000 dollars
Codename says

Thanks DDStudios, one more question : which jquery functions will I require to make something like I’m expecting…?

2952 posts
  • Attended a Community Meetup
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
  • Bought between 100 and 499 items
  • Contributed a Blog Post
  • Elite Author
  • Exclusive Author
+5 more
DDStudios says

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 :-)

Jquery.post sucks :-)

46 posts
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 1 000 and 5 000 dollars
Codename says

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?

2952 posts
  • Attended a Community Meetup
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
  • Bought between 100 and 499 items
  • Contributed a Blog Post
  • Elite Author
  • Exclusive Author
+5 more
DDStudios says

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 :)

1657 posts
  • Exclusive Author
  • 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
  • Europe
+2 more
flashedge says

Don’t use AJAX . It’s a royal pain to work with.

46 posts
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 1 000 and 5 000 dollars
Codename says

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! :)

613 posts
  • Power Elite Author
  • Referred more than 2000 users
  • Power Elite Author: Sold between 2 000 000 - 4 999 999 dollars
  • Austria
  • Bought between 100 and 499 items
  • Has been a member for 5-6 years
+4 more
Kriesi says
http://net.tutsplus.com/tutorials/javascript-ajax/how-to-load-in-and-animate-content-with-jquery/

But as flashedge said: its really a royal pain, especially when you use it in conjunction with wordpress, since almost every javascript wordpress plugin will break.

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

46 posts
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 1 000 and 5 000 dollars
Codename says

I guess Ill stick with simple links for now and only use AJAX for minor stuff. Thanks for the input guys.

by
by
by
by
by
by