$(document).ready(function(){
txtPrntMsg1 = $('.chld').parents('.parnt').text();
alert(txtPrntMsg1);
txtchldMsg1 = $('.parnt').children('.chld').text();
alert(txtchldMsg1);
});
I am parent block I am child of Parent class parnt
$(document).ready(function(){
txtPrntMsg1 = $('.chld').parents('.parnt').text();
alert(txtPrntMsg1);
txtchldMsg1 = $('.parnt').children('.chld').text();
alert(txtchldMsg1);
});
I am parent block I am child of Parent class parnt
Comments
Post a Comment