Forums

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

Home Forums JavaScript JavaScript to add classes

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #193680
    wolfgang1983
    Participant

    I would like to know the best method if a input has type=”text” and a type=”password” then the java script would add class="form-control" what would the best js be for that? I cannot find best suited one? Because I do not want to have to add that class each time.

    #193681
    Paulie_D
    Moderator

    And if the user has JS disabled your site falls apart.

    Some times you just have to do the work.

    #193684
    wolfgang1983
    Participant

    @Paulie_D Thanks for tip.

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