SORU
29 Kasım 2008, CUMARTESİ


Fade-in kullanma ve ekleme

Benim sayfaya JSON veri yükleme ve appendTo kullanıyorum() ama sonuç olarak yavaş yavaş yapmaya çalışıyorum, herhangi bir fikir?

$("#posts").fadeIn();
$(content).appendTo("#posts");

Ekleme ve appendTo, belgeler arasında bir fark olduğunu gördüm.

Bu da çalıştı:

$("#posts").append(content).fadeIn();

Anladım, yukarıdaki trick yaptı!

Ama "" JSON benim değerlerden biri olarak. tanımsız olsun

CEVAP
29 Kasım 2008, CUMARTESİ


Sen bunu eklemek ve fade-in yöntemi zinciri önce içeriğini gizlemek, aradığınız etkiyi elde etmelisiniz.

// Create the DOM elements
$(content)
// Sets the style of the elements to "display:none"
    .hide()
// Appends the hidden elements to the "posts" element
    .appendTo('#posts')
// Fades the new content into view
    .fadeIn();

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • GirlSanctuaryBlog

    GirlSanctuar

    28 Aralık 2011
  • Pocketnow

    Pocketnow

    14 EKİM 2007
  • SuperPrincessjo

    SuperPrinces

    1 EKİM 2010