javascript - How to hide the first tag of a certain type on a page -
is there anyway select first instance of tag on page?
i'm using drupal , client changing 1 field another, temporarily needs both fields (due events created old field, , ongoingly, new events), want 1 display.
i want make first instance of <label>content</label>
, <span class="date-display-single">content</span>
not visible.
css (i don't know if suitable you):
label:first-of-type, .date-display-single:first-of-type { display: none; }
if must support older versions of browsers, don't support :first-of-type
pseudo class, can go vanilla js solution proposed kingkongfrog
Comments
Post a Comment