RipzCurlz
11-29-2008, 12:20 AM
Hey i wrote this code to load content without page loads.
I'm using the JQuery framework and im still quite new to it.
is it possible to fade the content in an out somehow.
<script type="text/javascript" >
$(document).ready(function(){
$('#mainDiv').load("Home.html");
$('li.home').click(function() {
$('#mainDiv').load("Home.html");
});
$('li.about').click(function() {
$('#mainDiv').load("About.html");
});
$('li.products').click(function() {
$('#mainDiv').load("Products.html");
});
$('li.tech').click(function() {
$('#mainDiv').load("Technical.html");
});
$('li.palette').click(function() {
$('#mainDiv').load("Palette.html");
});
$('li.contact').click(function() {
$('#mainDiv').load("Contact.html");
});
});
</script>
The two things i tried were this:
$('li.home').click(function() {
$('#mainDiv').load("Home.html").fadeIn("slow");
});
And
$('li.home').click(function() {
$('#mainDiv').load("Home.html");
fadeIn("slow")
});
Im still learning the syntax properly
hopefully someone can help :)
Thanks in advance
I'm using the JQuery framework and im still quite new to it.
is it possible to fade the content in an out somehow.
<script type="text/javascript" >
$(document).ready(function(){
$('#mainDiv').load("Home.html");
$('li.home').click(function() {
$('#mainDiv').load("Home.html");
});
$('li.about').click(function() {
$('#mainDiv').load("About.html");
});
$('li.products').click(function() {
$('#mainDiv').load("Products.html");
});
$('li.tech').click(function() {
$('#mainDiv').load("Technical.html");
});
$('li.palette').click(function() {
$('#mainDiv').load("Palette.html");
});
$('li.contact').click(function() {
$('#mainDiv').load("Contact.html");
});
});
</script>
The two things i tried were this:
$('li.home').click(function() {
$('#mainDiv').load("Home.html").fadeIn("slow");
});
And
$('li.home').click(function() {
$('#mainDiv').load("Home.html");
fadeIn("slow")
});
Im still learning the syntax properly
hopefully someone can help :)
Thanks in advance