From d00fd34347a9e0555a0748c1770485f63db7513c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Bakkeli?= Date: Sun, 31 Jul 2011 22:55:02 +0200 Subject: [PATCH] news archive ajax works --- header.php | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/header.php b/header.php index 0613497..479f4f1 100755 --- a/header.php +++ b/header.php @@ -145,7 +145,44 @@ $j(".content .post,#header [href],.event-table tr,.widget_artist_widget p").live $j.modal.close(); }); + + $j(".content .navigation a").live('click', function(e) + { + e.preventDefault(); + p = this.parentNode; + while(p != null && (!p.className || p.className.indexOf("content") == -1)) + p = p.parentNode; + /* + durl = $("a[href^=\"/category/\"]",p).attr('href'); + durl += this.href.substr((window.location.origin + window.location.pathname).length); + */ + /* + $.get(this.href, function(html){ + nev = '
' + $("#" + p.id, html).html() + '
'; + + first = $('' + $(p).html() + '') + $(p).html(first); + + if(this.parentNode.className == 'nav-previous') + + + first.css('position','absolute'); + first.animate({left:800},500); + + + }); + */ + + + + $j.get(this.href, function(html){ + $j(p).html($j("#" + p.id, html).html()); + }); + + }); }); +var p; +