-1

I have the following label:

<label id="TWCv6" style="display:none">TWC</label>

I want to access it using its id plus Label selector to set its css. How can I do it?

Something like $('label .TWCv6'). Also I don't want to access using For attribute of the label.

Multi stack
  • 311
  • 3
  • 9
  • 18

2 Answers2

2

using its id plus Label selector

You need to prefix # when using ID Selector (“#id”)

Use

$('label#TWCv6')

Note: As Identifiers in HTML Must be unique. only $('#TWCv6') should work

Satpal
  • 132,252
  • 13
  • 159
  • 168
0

$("label#TWCv6") is what you are looking for