I'm trying to replace current dom element with new element i made.
I implemented following line
$(this).parent().replaceChild(newElem,this);
But it gives error saying $(this).parent().replaceChild is not a function
because replaceChild is not a jQuery function, what would be equivalent in jQuery?