How does this have to html code?

sammo

New Member
How does this html code look? Perhaps you know how to help me. I've been trying for 3 days to get a good push-state but there is nowhere that has open source that I can compare my code to? I'm getting a 404 error which leads me to believe I have an HTML code problem.\[code\]$(document).ready(function () { var firstLink = $("ul > li:first-child > a"); var menuLink = $("ul > li > a"); var firstLoadedHtml = firstLink.attr("href"); $("#sectionContainer").fadeOut("fast").load(firstLoadedHtml + " #content").fadeIn("fast"); firstLink.addClass("active"); menuLink.click(function(e) { e.preventDefault(); e.stopImmediatePropagation(); var newLoadedHtml = $(this).attr("href"); History.pushState(null, newLoadedHtml, newLoadedHtml); $("#sectionContainer") .fadeOut("fast") .load(newLoadedHtml + " #content", function(responseText) { document.title = $(responseText).filter("title").text(); }) .fadeIn("slow"); }); History.Adapter.bind(window, "statechange", function() { menuLink.removeClass("active"); $("a[href='" + History.getState().title + "']").addClass("active"); $('#sectionContainer').load(document.location.href + " #content", function(responseText) { document.title = $(responseText).filter("title").text(); }); var myUrl = "http://example.com/"; var curUrl = window.location; if(myUrl == curUrl) { $("#sectionContainer").hide().load(firstLoadedHtml + " #content").fadeIn("fast"); } });});\[/code\]Html\[code\]<ul> <li><a href="http://stackoverflow.com/questions/12729668/Pages1" title="Home">Home</a></li> <li><a href="http://stackoverflow.com/questions/12729668/Pages2" title="Portfolio">Portfolio</a></li> <li><a href="http://stackoverflow.com/questions/12729668/Pages3" title="Links">Links</a></li> <li><a href="http://stackoverflow.com/questions/12729668/Pages4" title="Contact">Contact</a></li> </ul><div id="sectionContainer"> <div id="Pages1"> </div> </div>\[/code\]
 
Back
Top