tr에 value를 주고 클릭시 this.val()했는데 값이 안넘어옴...

그래서 찾아보니

델리게이트   on메서드를 써야 했다... 

$(function(){
    $(".table .side-link").on('click',function(e){
        e.preventDefault();
        var id = $(this).attr('value');
        alert(id);
    });
});

'jquery' 카테고리의 다른 글

jQuery 선택자  (0) 2018.10.14
제이쿼리 소개  (0) 2018.10.14
jquery Json date read  (0) 2018.10.14
jquery selector 선택자  (0) 2018.10.14

+ Recent posts