Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Dynamic Page Load

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #29892
    jackreichert
    Member

    Hey,

    I am trying to use the Dynamic Page Load code. And it’s working with most browsers, except for firefox 3.6 in Windows.

    Any ideas?

    I changed it a little to make the hashes look more natural. But this problem started before I made those adaptations.

    Here is my adapted code:

    Code:
    $(function() {

    var newHash = “”,
    $mainContent = $(“#flash”),
    strLength = 0;

    $(“.nav”).delegate(“a”, “click”, function() {
    newHash = $(this).attr(“href”);
    strLength = newHash.length;
    newHash = “#”+newHash.substring(0,strLength-5);
    window.location.hash = newHash;
    return false;

    });

    $(window).bind(‘hashchange’, function(){

    newHash = window.location.hash.substring(1)+”.html”;
    $mainContent.load(newHash + ” #guts”);
    strLength = newHash.length;
    newHash = “#”+newHash.substring(0,strLength-5);
    console.log(newHash);
    $.scrollTo(newHash);
    });

    $(window).trigger(‘hashchange’);

    });

    Thanks in advance!

    Jack

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.