exclude elements
by Amanda Williamson
HTML
<div class="charting-wrapper">
<section id="charting">
<div class="chart-content-wrapper">
<div class="chart-tools-wrapper"></div>
<div class="chart-content">
<div class="chart-wrapper">
<div>THIS IS THE CHART!!!!!</div>
<div class="chart-nav">
<div class="chart-nav-btn-wrapper"></div>
</div>
</div>
</div>
</div>
</section>
</div>
CSS
div, section {
height: 200px;
width: 200px;
margin: 10px;
}
.charting-wrapper {
border: solid 1px gray;
}
#charting {
border: solid 1px blue;
}
.chart-content-wrapper {
border: solid 1px yellow;
}
.chart-content {
border: solid 1px green;
}
.chart-wrapper {
border: solid 1px black;
}
.chart-nav, .chart-tools-wrapper {
border: dashed 1px red;
}
JavaScript
//$('.charting-wrapper').find('.chart-nav').css('border', 'double 5px red');
var chartingWrapper = $('.charting-wrapper');
var chartNav = chartingWrapper.find('.chart-nav').remove();
var chartTools = chartingWrapper.find('.chart-tools-wrapper').remove();
//var chartingWrapper1 = $('.charting-wrapper').not(chartingWrapper).not(chartTools).html();
console.log(chartingWrapper, chartingWrapper1);