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

Home Forums JavaScript class not getting registered?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #167035
    Attila Hajzer

    when it adds the new class,

    after clicking the new class, is it not getting registered as a proper class?


    Or you can attach the click event handler to the body and pass the class in as a secondary argument, this adds the event handler to any existing and any dynamic element that matches the selector

    n.b. .on() was added to jQuery at version 1.7 so of course this solution requires jQuery 1.7 at the least

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