How To: Create dynamic Content Loading using Ajax and jQuery
Create simple ajax base page loading using jQuery fadeIn effects. Put some awesome styles to your web pages using ajax base content loading. Demo and code available.
Table Structure:
CREATE TABLE `data` ( `id` int(11) NOT NULL auto_increment, `full_text` text NOT NULL, `page_name` varchar(50) NOT NULL, `heading` varchar(50) NOT NULL, PRIMARY KEY (`id`) )
jQuery Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | $(document).ready(function(){ $('.super').click(function(){ $('#container').fadeOut(); var a = $(this).attr('id'); $.post("ajax_page.php?id="+a, { }, function(response){ //$('#container').html(unescape(response)); ///$('#container').fadeIn(); setTimeout("finishAjax('container', '"+escape(response)+"')", 400); }); }); }); function finishAjax(id, response){ $('#'+id).html(unescape(response)); $('#'+id).fadeIn(); } |
HTML
1 2 3 4 5 6 7 | <input type="button" name="test" class="super red button" id="1" value="Home" /> <br /> <input type="button" name="test" class="super buy button" id="2" value="About" /> <br /> <input type="button" name="test" class="super green button" id="3" value="Services" /> <div id="container"></div> |
Who I Am

Zeeshan Rasool
Software Engineer - PHP
Lahore - Pakistan
zeeshan(@)99points.info
Skype: zeeshan-rasool
gTalk: zishan.rasool85
Categories
- AJAX (37)
- Codeigniter (16)
- CSS (16)
- Facebook (11)
- Joomla (1)
- JQuery (53)
- Miscellaneous (4)
- Mootools (1)
- MySQL (6)
- PHP (60)
- SEO (2)
- Technology (6)
- Tutorials (15)
- Twitter (2)
- Web Design (23)
- Web Development (57)
- WordPress (2)
Tags
99points
adobe
AJAX
ajax pagination
ajax rating
ajax tutorial
ajax voting system
captcha
Codeigniter
codeigniter 2.0
codeigniter recaptcha
CSS
css tutorials
dreamweaver cs5
Facebook
facebox
farmville
ffmpeg
flv
google api
hacking
Joomla
JQuery
JQuery Gallery
JQuery menus
Jquery tutorial
mafia war
Mootools
MySQL
pagination
Payment
PHP
php curl
recaptcha
RSS Feed
SEO
simplepie
socail networking
ssl
Tutorials
Twitter
wall script
Web
XSS
youtube
Comments
- ZeeShaN on Facebook Wall Script Clone with JQuery and PHP: Personal Project BETA Version 2.0
- 20 + Fresh jQuery Image Gallery/Slider Plugins and Tutorials Worth a Look | free on JQuery Based Flipped Image Gallery with Bounce Effects
- 20 + Fresh jQuery Image Gallery/Slider Plugins and Tutorials Worth a Look | free on Fresh JQuery Image Gallery with Captions and Auto Play/Pause Rotation
- 25 Cool and Helpful jQuery Plugins/Tutorials For Your Next Project | free on jQuery Tutorial: Create jQuery and CSS based Awesome navigation.
- 25 Cool and Helpful jQuery Plugins/Tutorials For Your Next Project | free on Ajax Tutorial: How to Create Ajax Search Using PHP jQuery and MYSQL
ZeeShaN







thank you Suparjito
be in touch
this tutorial is amazing..
thank you for sharing..
this tutorial is very nice..
thank you very much!
Nice tutorial, please send me for update more tutorials! thnks verymuch…
[...] Demo Download [...]
this script works fine in Firefox, safari and chrome. but not working in IE.
it is not working in IE 7,8 and 9.
Greate job. Well done!!!
Hi!
Im downloadd the example. Not work! The database name and the table name are diferents. How can i fix it?
Thanks
Thanks for sharing this ZeeShan. Took a bit of noodling to get it to work – but it’s very neat!