D3:Learning:Selectors:select
A starting point to clone and get investigating quickly.
by Sky Sigal
HTML
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.4.11/d3.min.js"></script>
<div id="exSelect">
<p>Uno</p>
<p>Dos</p>
</div>
JavaScript
jQuery(document).ready(function() {
//Use d3:
d3
//Within the exSelect, select a p element (we are not using selectAll):
.select("#exSelect p")
//OK:.select("#exSelect > p")
//NOT OK: .select("#exSelect.p")
//And stye it:
.style("color","red");
});