Skip to content

Organizes a page of sections and scrolls to the selected section

License

Notifications You must be signed in to change notification settings

chrisjagoda/iron-page-scroll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Published on webcomponents.org

<iron-page-scroll>

iron-page-scroll is used to select one of its children to scroll to and update the target on scrollover.

Example:

<dom-bind>
  <template is="dom-bind">
    <iron-page-scroll selected={{page}}>
      <div>One</div>
      <div>Two</div>
      <div>Three</div>
    </iron-page-scroll>
  </template>
</dom-bind>  

It is also designed to be compatible with iron selector, being substitutible with iron-pages.

Example:

<dom-bind>
  <template is="dom-bind">
    <iron-selector selected="{{page}}" attr-for-selected="name">
      <a name="view1">View One</a>
      <a name="view2">View Two</a>
      <a name="view3">View Three</a>
    </iron-selector>

    <iron-page-scroll selected="{{page}}" attr-for-selected="name">
      <div name="view1">One</div>
      <div name="view2">Two</div>
      <div name="view3">Three</div>
    </iron-page-scroll>
  </template>
</dom-bind>