Sunday, 15 August 2010

javascript - Jquery .on() not triggering toggleClass function -


I was dynamically adding a show to click on the table with a similar class name with JS / Junkery I'm ');});

Then once a column is dynamically added, when I click on each cell, I have a toggleclass () function to show a CSS add_week_bg class function, show it below Marking as

  $ ("Highlight"). ("Click", function () {console.log ('clicked') $ (this) .toggleClass ("add_bg");});   

A column has been dynamically added, and when my cell comes click once my problem comes to play. (Does not trigger on).

Here's a JSF

Thank you in advance.

You can click on event delegation (

Demo ------>



No comments:

Post a Comment