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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -