Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I used the example in <a href="http://docs.angularjs.org/api/ng.directive:ngShow" rel="noreferrer">ngShow</a> to make the following <a href="http://jsfiddle.net/adrianhdezm/sqtng/" rel="noreferrer">jsfiddle</a> based on angular1.2.0-rc.3. </p> <p>The html code:</p> <pre><code>&lt;div ng-app="App"&gt; Click me: &lt;input type="checkbox" ng-model="checked"&gt;&lt;br/&gt; &lt;div class="check-element animate-show" ng-show="checked"&gt; &lt;span class="icon-thumbs-up"&gt;&lt;/span&gt; I show up when your checkbox is checked. &lt;/div&gt; &lt;div class="check-element animate-show" ng-hide="checked"&gt; &lt;span class="icon-thumbs-down"&gt;&lt;/span&gt; I hide when your checkbox is checked. &lt;/div&gt; &lt;/div&gt; </code></pre> <p>The CSS styles</p> <pre><code>.animate-show.ng-hide-add, .animate-show.ng-hide-remove { -webkit-transition:all linear 0.5s; -moz-transition:all linear 0.5s; -o-transition:all linear 0.5s; transition:all linear 0.5s; display:block!important; } .animate-show.ng-hide-add.ng-hide-add-active, .animate-show.ng-hide-remove { line-height:0; opacity:0; padding:0 10px; } .animate-show.ng-hide-add, .animate-show.ng-hide-remove.ng-hide-remove-active { line-height:20px; opacity:1; padding:10px; border:1px solid black; background:white; } .check-element { padding:10px; border:1px solid black; background:white; } </code></pre> <p>And finally the JavaScript code, don't forget to include the libraries <code>angular.js</code> and <code>angular-animate.js</code></p> <pre><code>angular.module('App', ['ngAnimate']); </code></pre> <p>I hope it helps you ;)</p>
    singulars
    1. This table or related slice is empty.
    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. 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