Giriş Yap Kayıt ol Online Üyeler Aktif Konular Arama Üyeler Forum Kuralları
Tahribat.Com | Javascriptten Anlayan Bakabilir Mi
Tahribat.Com Forumları
Html - CSS - XML - JavaScript - Ajax
      Javascriptten Anlayan Bakabilir Mi
Bu Bölümde yeni konu açmak için tıklayın Konuyu cevaplamak için tık...
Konu 4 Nisan 2010 (Pazar) 11:59 tarihinde açıldı. Kısayol | Alıntı yap | Özel Mesaj
aksata


Kayıt : 28 Aralik 2009
Tahribat
Erkek Üye
 

web sitesinde seo var tablar arasında geçişte aşağıdaki kırmızı yazıyla yazılan bölüm kullanılıyor. Fakat seo dan dolayı galiba tablar arası geçişte sayfa yenileniyor.Sayfa yenilenmeden içerik değiştirmesini istiyorum. Olayı bir türlü çözemedim. Diğer loading2 çalışıyor

 

 

 

function showbox(elmnt) {

            document.getElementById('hiddencats').style.display = 'block';

}

 

function hidebox() {

            document.getElementById('hiddencats').style.display = 'none';

}

 

function fixURL() {

            parts = window.location.href.split("#/");

            if(parts.length > 1) {

                        window.location.href = parts[parts.length - 1];

            }

}

 

function changeURL(href) {

            href = (href == "") ? "/" : href;

            uri = window.location.href.split("#/");

            window.location.href = uri[0] + "#/" + href;

}

 

if(typeof jQuery == "function") {

            jQuery(document).ready(function($) {

                        fixURL();

                        $("#post-container").css("display", "block");

                        init(jQuery, "body");

            });

           

            function init($, id) {

                        id = (typeof(id) == 'undefined') ? "body" : id;

                       

                        $(".morecomments a").click(function() {

                                   href = $(this).attr('href');

                                   uri = href.split("#")[0];

                                  

                                   stylesheet_uri = $("link[rel='stylesheet']:eq(0)").attr("href").split("/");

                                   stylesheet_uri.length--;

                                   img = "<img src='"+stylesheet_uri.join("/") + "/images/indicator_small.gif"+"' alt='Loading1' />";

                                   $(this).parent().css("text-align", "center").html(img).parent().load(uri + " div#comments #commentlist");

                                   return false;

                        });

                       

                        $("a.respondlink").click(function() {

                                   post_id = $(this).attr('id').split("-")[1];

                                   if(typeof(post_id) != "undefined") {

                                               $(this).parent().next().next().css("display", "none");

                                               $("#commentform-" + post_id).css("display", "block");

                                               $("#commentform-" + post_id + " .focus:first").focus();

                                   } else {

                                               $(".respondtext").parent().css("display", "none");

                                               $("div#comment_form").css("display", "block");

                                               $("#commentform .focus:first").focus();

                                   }

                                   return false;

                        });

                       

                        $(".respondtext").click(function() {

                                   $(this).parent().css("display", "none");

                                   if($(this).hasClass("single")) {

                                               $("a.respondlink").click();

                                   } else {

                                               $(this).parent().prev().prev().children("a.respondlink").click();

                                   }

                        });

                       

                        function nextpost() {

                                   $(this).unbind('click', nextpost);

                                   stylesheet_uri = $("link[rel='stylesheet']:eq(0)").attr("href").split("/");

                                   stylesheet_uri.length--;

                                    img = "&nbsp;<img src='"+stylesheet_uri.join("/") + "/images/indicator_small.gif"+"' alt='Loading2' />";

                                   $(this).after(img);

                                   href = $(this).attr("href");

                                   link = $(this);

                                   $(".post-list").removeClass("post-list");

                                   $(this).parent().parent().before("<div class='older'></div>");

                                   $(this).parent().parent().prev().load(href + " .post-list", {}, function() {

                                               init(jQuery, ".post-list");

                                               link.next().remove();

                                               nextpostslink = (typeof($("#nextpage").attr("value")) == "undefined") ? "mbuh" : $("#nextpage").attr("value");

                                               $("#nextpage").remove();

                                               if(nextpostslink == "mbuh") {

                                                           link.remove();

                                               } else {

                                                           link.attr("href", nextpostslink);

                                               }

                                   });

                                   return false;

                        }

                        $("a.nextpost").click(nextpost);

                       

                        $(id + " a").not(".nextpost").not(".notajax").each(function() {

                                   site = $("meta[name='home']").attr("content");

                                   dashboard = $("meta[name='url']").attr("content") + "/wp-admin";

                                   wplogin = $("meta[name='url']").attr("content") + "/wp-login.php";

                                   if (

                                               $(this).attr('href') != '#' && //it's not a '#' only link

                                               $(this).attr('href').indexOf(site) == 0 && //it's an internal link

                                               $(this).attr('href').indexOf(dashboard) == -1 && //it's not a link to dashboard

                                               $(this).attr('href').indexOf(wplogin) == -1 && //it's not a link to wp-login.php

                                               $(this).attr('target') != '_blank' //it's not a new window link

                                   ) {

                                               $(this).click(function() {

                                                           hidebox();

                                                           hrefs = $(this).attr("href").split("#");

                                                           href = hrefs[0];

                                                           if($(this).parent().hasClass("cat-item")) {

                                                                       $(".cat-item").removeClass("current-cat");

                                                                       $(this).parent().addClass("current-cat");

                                                           }

                                                          

                                                           stylesheet_uri = $("link[rel='stylesheet']:eq(0)").attr("href").split("/");

                                                           stylesheet_uri.length--;

                                                           img = "<img src='"+stylesheet_uri.join("/") + "/images/indicator_large.gif"+"' alt='Loading3' />";

                                                           $("#post-container").html(img).load(href + " #posts", {}, function() {

                                                                       if($("#post-container").html() == "") {

                                                                                  window.location.href = href;

                                                                                  return false;

                                                                       }

                                                                      

                                                                       document.title = $("input[type='hidden'][name='title']").attr("value");

                                                                       site = (site.charAt(site.length - 1) == "/") ? site : site + "/";

                                                                       href = href.replace(site, "");

                                                                       if(hrefs.length > 1)

                                                                                  href += "#" + hrefs[hrefs.length - 1];

                                                                       changeURL(href);

                                                                       init($, "#posts"); //re-init the database

                                                           });

                                                           return false;

                                               });

                                   }

                        });

                       

                        $('textarea').not(".respondtext").autogrow({

                                   minHeight: 30

                        });

            }

}

 

 

 


 
8 Nisan 2010 (Persembe) 11:58 tarihinde yazıldı. Kısayol | Alıntı yap | Özel Mesaj
aksata


Kayıt : 28 Aralik 2009
Tahribat
Erkek Üye
 
del

 

[1]


Bu Bölümde yeni konu açmak için dıklayın Konuyu cevaplamak için tık...
Allah'a Havale Et Google Bookmark'a Ekle Yahoo'ya Ekle Stumbleupon'a Ekle Facebook'a Ekle Twitter'a Ekle   Google'da Ara : Javascriptten anlayan bakabilir mi Favorilerime Ekle Yukarı Çık
Konuda 2 Mesaj Var.
Konu 412 Sefer Gösterilmiş.
2001-2012 © Tahribat Group - Her Hakkı Saklıdır. - ● Gizlilik İlkeleri ● Kullanım Koşulları ● İletişim