- This topic is empty.
-
AuthorPosts
-
October 18, 2011 at 4:07 pm #34816
ethel
MemberHello,
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, ethelOctober 18, 2011 at 4:23 pm #89250ethel
MemberI 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
November 2, 2011 at 6:46 pm #90102ethel
MemberHello 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, EthelNovember 2, 2011 at 7:29 pm #90104ethel
Memberthis 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 {}
});
}; -
AuthorPosts
- The forum ‘Other’ is closed to new topics and replies.