Javascript/Jquery How to catch the use of a CSS class -
i using javascript plugin (several lines of code) times times released new version.
for reason trying avoid changing original source code in order affect wishes.
one way "half" working me find elements using specific css class (or group of classes) , them removing (or else them) in order want.
the part not working "trigger/event" process action. during execution of plugin new elements created , removed , once again having "wrong" entries once again.
my question: how can "catch" elements "from moment other" using css class xxx? , execute own code.
notes: reading jquery .on() need specify event, issue not know many "places/events" original source code processing this.
update: @ point "manually" calling function:
function myoverrideaction(){ $.each( $( ".sch-gantt-terminal" ), function( key, value ) { // here have logic.... based on several rules (non relevant stackoverflow question) }); } i want function executed every instance when html element using target css class.
maybe search this:
https://stackoverflow.com/a/3219767/5035890
if listen change in dom can apply actions need. mutationobserver can achieve it. please, consider of compatibility.
good luck
Comments
Post a Comment