Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The AngularJS framework will make it very easy to do this. If you can't take advantage of the many great features of Angular, you may want to recreate just this functionality and no include the whole framework. Let me summarize what angular does as it relates to your issue.</p> <p>You store a "watch" function that returns something you want to watch for changes, in your case you will return something like the amount of attributes or a boolean - whether or not it has an attribute, etc...whatever fits your needs. You will store that value so that you know what the old value was when the function runs again. You also store a callback to run if the returned value differs from the previous value. The "watch" check will repeat after the callback until the value stops changing (be careful of an endless loop). At this point, you'll use some event to kick off your watch check and callback. For example, if you click a button to make the slider begin, then call your function inside that button's click event. The thing to think about here is that you don't really need an event to deal with the dom element directly, but rather some other event or function. A more specific answer would really require seeing the code you're dealing with and better understanding your issue/goal. <a href="http://teropa.info/blog/2013/11/03/make-your-own-angular-part-1-scopes-and-digest.html" rel="nofollow noreferrer">Here's a detailed guide on how Angular implements the watcher/callback.</a> </p> <p>The more important thing to say here is that this might be an <a href="https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem">X/Y problem</a>, where you're concerned about how to implement a certain solution to your actual problem, but your solution isn't good to begin with. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload