46 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $1,000+ on Envato Market
  • Sells items exclusively on Envato Market
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
  • Has been part of the Envato Community for over 5 years
  • Has referred 200+ members
  • Has sold $125,000+ on Envato Market
  • Had an item featured in an Envato Bundle
+10 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
  • Has been part of the Envato Community for over 4 years
  • Has sold $1,000+ on Envato Market
  • Sells items exclusively on Envato Market
Codename says

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

2952 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 200+ members
  • Has sold $125,000+ on Envato Market
  • Had an item featured in an Envato Bundle
+10 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
  • Has been part of the Envato Community for over 4 years
  • Has sold $1,000+ on Envato Market
  • Sells items exclusively on Envato Market
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
  • Has been part of the Envato Community for over 5 years
  • Has referred 200+ members
  • Has sold $125,000+ on Envato Market
  • Had an item featured in an Envato Bundle
+10 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 :)

1664 posts
  • Has referred 50+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Won a Most Wanted contest
+9 more
flashedge says

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

46 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $1,000+ on Envato Market
  • Sells items exclusively on Envato Market
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! :)

631 posts
  • Has referred more than 5000 members
  • Has sold $5M+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Had an item featured in a magazine
+9 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
  • Has been part of the Envato Community for over 4 years
  • Has sold $1,000+ on Envato Market
  • Sells items exclusively on Envato Market
Codename says

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

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by