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.
The two things i tried were this:Code:<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>
AndCode:$('li.home').click(function() { $('#mainDiv').load("Home.html").fadeIn("slow"); });
Im still learning the syntax properlyCode:$('li.home').click(function() { $('#mainDiv').load("Home.html"); fadeIn("slow") });
hopefully someone can help
Thanks in advance




Reply With Quote

Bookmarks