Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Change color of a Label

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #26273
    Hand2Mouth
    Member

    Hi

    How can i change the background color of a label when the input is selected. The label in question is for a serie of radio input.

    Thanks a lot for any suggestion

    #64813
    Hand2Mouth
    Member

    onClick="if (this.checked){uno.className=’item1′}else{uno.className=’choise’}" :D

    #65172
    BaylorRae
    Member

    If you’re using jQuery it’s really easy.

    Code:
    $(‘input’).focus(function() {
    $(this).prev(‘label’).css(‘color’, ‘green’);
    }).blur(function() {
    $(this).prev(‘label’).css(‘color’, ‘blue’);
    });;
    #65214
    siaradessy
    Member

    I can’t see the option to change my labels,i’m iu suppose to enable something in order to change the label color.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.