Grow your CSS skills. Land your dream job.

WordPress Internal Link AJAX functionality

  • # March 18, 2010 at 12:16 pm

    Hi there CSS-TRICKS im kinda new here, I found this screencast about WordPress AJAX thingy really nice and helpfull.

    Now I implemented it and it works like a charm, only problem is I use a lightbox Image viewer. And the links the are used there to pop-up the image are targeted by the js and transformed with a Hash tag. http://www.elmarnoteboom.com is the site.

    Maybe you guys could tell me how to make sure he doesn’t target that links as internal ones.

    Thanks in advance!

    Rick Lamers

    # March 18, 2010 at 12:42 pm

    Also internet explorer still glitches the # thingy. Even with this piece of JS:

    function hashizeLinks() {
    $("a[href^=’"+siteURL+"’]").each(function() {
    $el = $(this);

    // Hack for IE, which seemed to apply the hash tag to the link weird
    if ($.browser.msie) {
    $el.attr("href", "#/" + this.pathname)
    .attr("rel", "internal");
    } else {
    $el.attr("href", "#" + this.pathname)
    .attr("rel", "internal");
    }
    });
    };

    Kinda blows, now I can’t implement it…

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".