jquery

<tr>에서 get value() 벨류값 가져오기

호밀밭의밀수꾼 2019. 5. 22. 11:35

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

그래서 찾아보니

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

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