This illustrates the toggle function on the element. On a
button, the element would also return...
http://plnkr.co/edit/NJdGnt3KCCZtik7zD7dC?p=info
* * *
One issue that one needs to be aware of is the infernal bubbling
problem. If one neglects to be specific about what elements are to be affected by
code, a click will go through more than one layer. To wit, this example
from Javascript.info:
http://plnkr.co/edit/eOq1v6Y9JeqtikKHjfh4?p=info
The alternative is specific code:
No comments:
Post a Comment