My HTML
<div class="item-page">
<div class="Introduction">
<div class="FrTxtLoans">
<h1 class="uppercase"> home-mortgage </h1>
</div>
</div>
<div id="main_content">
<div class="landing_wrapper"> </div>
</div>
</div>
My Question
What I want to do is remove all the dives around <div class="landing_wrapper"> </div>
My Script
Im using
$('.item-page').replaceWith($('.landing_wrapper')); and it works like a charm.
See jsFiddle here
My Issue
Since I have a MooTools and jQuery conflict on my website, I used jQuery.noConflict(); at top of my website and renamed
$('.item-page').replaceWith($('.landing_wrapper'));
with
jQuery('.item-page').replaceWith($('.landing_wrapper'));
Then the replaceWith stopped working. jQuery Conflct jsFiddle here
Can you guys please show me the issue?
Your original code was actually calling the jQuery object twice (the
$), so in your second example you have to replace both instances of$withjQuery