Answer the question
In order to leave comments, you need to log in
Parent ID based on child?
Hello! The task is this: you need to find out the ID of the button's parent. I do so. I press the button. Next, I find out the parent of the pressed button. Next, I translate the parent into a string (I'm not sure what I'm doing right). Then I display the parent's ID through the alert. It prints undefined :( Please correct me.
$('table').on('click','button', function(){
$per = $(this).parent();
$lel = $.param($per);
alert($lel).attr('id');
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question