Skip to content

Trakkasure/dom-if-else

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dom-if-else

Modification of dom-if to be if/else compliant.

This is a Polymer Element providing the missing ELSE portion for the "DOM-IF" template by way of an alterative to DOM-IF.

Build Status Build Status Coverage Status

Sauce Test Status

Install

bower install --save dom-if-else

Example

    <button onclick="clicked()">Toggle</button>
    <template id="domIf" is="dom-if-else" if>
      <if-then>
          <div>1</div>
          <div>2</div>
          <div>3</div>
          Stuff
          <div>4</div>
      </if-then>
      <if-else>
          <div>e1</div>
          <div>e2</div>
          More stuff
          <div>e3</div>
      </if-else>
    </template>

    <script>
       function clicked() {
           var t=document.querySelector('#domIf');
           t.set('if',!t.if);
       }
    </script>

About

Modification of dom-if to be if/else compliant.

Resources

License

Stars

Watchers

Forks

Packages

No packages published