Forums

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

Home Forums Other Ajax theme

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #34816
    ethel
    Member

    Hello,
    I bought the diw book and am using the ajax theme on my wordpress site. I would like to know, how i can escape an internal link to open in ajax mode. i have some old html pages on my root which are not part of my wordpress site (wordpress is in a folder), which i want to open in normal mode. Can you help me? I know I’m probably in the totally worng forum, but I’m desperate and I don’t know where to look.
    Many greetings, and thank you, ethel

    #89250
    ethel
    Member

    I just found the solution myself, can’t believe it…..

    in allajax.js

    change this:
    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”);
    }
    });
    };

    to:
    function hashizeLinks() {

    $(“a[href^='”+siteURL+”‘]”).each(function() {
    $el = $(this);
    if($el).attr(“target”) != “_blank” {

    // 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”);
    }
    }else {
    .attr(“rel”,””);
    }
    });
    };

    => if the link has target=”_blank” the rel=”” and this escapes the internal loading.

    Greetings, Ethel

    #90102
    ethel
    Member

    Hello again,
    I just found out that my solution kills all internal links, I didn’t notice when I made my fantastic programming;=) I thought it is beginners luck…
    So i’m back with my question, how to prevent a link to an old page on my root which is not part of wordpress, and should therefore not be “ajaxified” but open in a blank page with its old, normal html…can you help me? Now it jumps to the startpage of my new wordpress version.
    Otherwise I’m really happy with the theme.
    Many greetings, and thank you for your help, Ethel

    #90104
    ethel
    Member

    this solution works:

    function hashizeLinks() {
    $(“a[href^='”+siteURL+”‘]”).each(function() {
    $el = $(this);
    if($el.attr(“target”)==””) {

    // 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”);
    }
    } else {

    }
    });
    };

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Other’ is closed to new topics and replies.