What I'm aiming for is for jQuery to look at the element I've just clicked on (for example a p or an li tag), then apply a styling to all instances of that element (so all p tags on the page).
This is my code so far, but it only applies the styling to the single element that has been clicked on.
$("article *", document.body).click(function (e) {
e.stopPropagation();
selectedElement = $(this);
$(selectedElement).css("border", "1px dotted #333")
});
Would appreciate any help or advice!