Hi,
I want to know about the following code which are given below?
if ($(this).parent().is('span')) {
$(opt).show();
$(span).replaceWith(opt);
Why are we use $(this).parent().is('span') and
$(opt).show();
$(span).replaceWith(opt);
3 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Upendra Pratap ShahiPosted Jul 22, 2015, 7:45 AM
Upendra Pratap ShahiPosted Jul 7, 2015, 5:08 AM
Muralishankar SundaramPosted Jul 22, 2015, 6:05 AM
if ($(this).parent().is('span'))// its validating parent element is 'span' tag
$(opt).show();//showing the 'opt' element
$(span).replaceWith(opt); // replacing the span element with the opt element.
Regards,