JSFiddle - React, Tailwind, and code Playground
by bilbobaggins
HTML
<div id="intro">
<p>
meh no content
</p>
<p class="foo">
meh no content secondary
</p>
</div>
<img src="pic_mountain.jpg" class="photo" alt="Mountain View" style="width:304px;height:228px;">
CSS
.highlight {
background: yellow;
}
JavaScript
var height = $('div#intro').height();
console.log(height);
var src = $('img.photo').attr('src');
console.log(src);
var lastP = $('#intro p:last').html();
console.log(lastP);
var hasFoo = $('#intro p:last').hasClass('foo');
console.log(hasFoo);