JSFiddle - React, Tailwind, and code Playground
by magicaj
HTML
<span class="adsize"><input type="checkbox" name="size" value="1" id="size1" class="adsize_click"><label for="size1" class="adsize_click2">Leaderboard</label></span>
JavaScript
$('.adsize_click').click(function() {
$(this).closest('span').toggleClass('ad_active');
$('.ads_selected').append($(this).closest('label').html());
});