fsm-sticky-header

WebJar for fsm-sticky-header

License

License

MIT
Categories

Categories

Github Development Tools Version Controls
GroupId

GroupId

org.webjars.bower
ArtifactId

ArtifactId

github-com-heurze-sticky-header
Last Version

Last Version

1.0.3
Release Date

Release Date

Type

Type

jar
Description

Description

fsm-sticky-header
WebJar for fsm-sticky-header
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/heurze/sticky-header

Download github-com-heurze-sticky-header

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bower/github-com-heurze-sticky-header/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>github-com-heurze-sticky-header</artifactId>
    <version>1.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/github-com-heurze-sticky-header/
implementation 'org.webjars.bower:github-com-heurze-sticky-header:1.0.3'
// https://jarcasting.com/artifacts/org.webjars.bower/github-com-heurze-sticky-header/
implementation ("org.webjars.bower:github-com-heurze-sticky-header:1.0.3")
'org.webjars.bower:github-com-heurze-sticky-header:jar:1.0.3'
<dependency org="org.webjars.bower" name="github-com-heurze-sticky-header" rev="1.0.3">
  <artifact name="github-com-heurze-sticky-header" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='github-com-heurze-sticky-header', version='1.0.3')
)
libraryDependencies += "org.webjars.bower" % "github-com-heurze-sticky-header" % "1.0.3"
[org.webjars.bower/github-com-heurze-sticky-header "1.0.3"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.bower : angular jar [1.3.0,1.4)
org.webjars.bower : jquery jar [1.7.0,)

Project Modules

There are no modules declared in this project.

sticky-headers

An AngularJS directive for making headers that won't scroll past the top of the screen.

Demo Page

How to use it

Just include jquery, angular, and the sticky-headers javascript file in your page, or install via bower

bower install fsm-sticky-header
  <head>
	<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
	<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.6/angular.min.js"></script>
	<script src="https://rawgithub.com/FutureStateMobile/sticky-headers/master/src/fsm-sticky-header.js"></script>
  </head>

Then add the directive to the element that you with to stick to the top of the page

  <table id="testtable" >
    <thead>
      <tr fsm-sticky-header scroll-body="'#testtable'" scroll-stop='50'>
         <th>Column One Header</th>
         <th>Column Two Header</th>
      </tr>
    </thead>
    <tbody>
      <tr>
         <td>table1 data1</td>
         <td>table1 data1</td>
      </tr>
      <tr>
         <td>table1 data2</td>
         <td>table1 data2</td>
      </tr>
      ...
    </tbody>
  </table>

Options

  • scroll-body
    • this is the JQuery selector of the element that your header is bound to. Sticky header will follow the position of that element and keep the header on top of that element as it scrolls off the page.
  • scroll-stop
    • this is how many pixels from the top of the page your elment will stop scrolling at, just in case you have a header on the top of your page.
  • scrollable-container
    • If you have a scrollable element such as a div, rather than the web page body scrolling, you'll need to specify that element id here.

Versions

Version
1.0.3