Simple Example Of Treating An Elm As An Object

This is just an example of what I'm trying to explain.

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<p data-cont="this is the original test">
Test 1
</p>

<p data-cont="this is some other test">
Test2
</p>

<p data-cont="you badass.. you obey no rules">
Go on! Click me, I dare you!
</p>

JavaScript

$(document).ready( function() {
	$('p').click( function() {
    var temp = $(this).attr('data-cont');
    if($('body').text().indexOf(temp) < 1) $('body').append('<br/><b>' + temp + '</b>');
  });
});