each에 dialog 여러번 나오게는 못하나요? 채택완료

Copy
$('.test_input').each( function() {
            $( "#dialog-confirm" ).dialog({
                resizable: false,
                height: "auto",
                width: 350,
                modal: true,
                buttons: {
                    "확인": function() {
                            $(this).dialog( "close" );
                        console.log("aaaa");                        
                    },
                    "취소": function() {
                            $(this).dialog( "close" );
                        console.log("aaaa");        

                    }
                }
            });
        });

 

test_input 가 2개 이상 있어도 dialog는 한번밖에 실행을 하지 않네요

 

test_input마다 확인 취소를 넣고 싶은데 어떻게 수정해야 할까요?

답변 1개

저거 div 한개씩 있는거 하나씩 나오게 될거에요  그니까 클래스로해서 지정해보세요

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인
🐛 버그신고