Refer to the current element
Dariel Noel edited this page Oct 1, 2014
·
8 revisions
####How refer to the current element?
Using the word: target like the next example:
"if click, on some li, do addClass hidden, to the clicked li"
<ul data-anijs="if: click, on: li, do: $addClass hidden, to: target" >
<li>Hidden me</li>
<li>Hidden me</li>
</ul>
Inside anijs sentence, you can refer to the element that triggered the event (A kind of "this" in respect of the event...) by using the word: target
- Get started
- The AniJS Language
- Sentence and Definitions
- Playing with CSS classes
- Clone and remove html elements
- Selecting html elements
- Referring to the current element
- Emitting your own events is easy
- Browser Compatibility
- Registering new Helpers
- Animation Context Instance
- Writing before and after functions
- Remove animation after function
- Hold animation after function
- Listening events from document and window
- Add default class names while Anim
- Changing travel scope
- Creating Events Systems
- Custom Events Listening
- Purge Events
- Handling Animations Using JavaScript
- Running AniJS repeatedly
- JQuery Events System
- Using AMD