SORU
25 Ocak 2013, Cuma


Nesne bir yöntem '' - jQuery live var

<script>
$(document).ready(function(){
    $('.delete').live('click', function(e){
        alert('delete');
        e.preventDefault();
    });
});
</script>
<a href='#' id='_1' class='delete'>Delete</a>

Bana bir hata veriyor:

Yakalanmamış TypeError: Object [object object] yöntem vardır '' . live

Ben bir sorun göremiyorum?

CEVAP
25 Ocak 2013, Cuma


.live() kaldırılan fonksiyonu (1.7 ) ve tamamen jQuery 1.9 kaldırıldı .

.on() .bind() yöntemleri kullanabilirsiniz:

http://api.jquery.com/on/
http://api.jquery.com/bind/

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

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • How It Should Have Ended

    How It Shoul

    5 Mart 2007
  • Megan Parken

    Megan Parken

    19 Temmuz 2009
  • thenewboston

    thenewboston

    4 ŞUBAT 2008