An open API service indexing awesome lists of open source software.

https://github.com/faisalman/sticklr-js

Sticklr.js - Sticky side panel jQuery plugin
https://github.com/faisalman/sticklr-js

jquery-plugin navigation-menus sticky-elements

Last synced: 8 months ago
JSON representation

Sticklr.js - Sticky side panel jQuery plugin

Awesome Lists containing this project

README

          

# Sticklr.js

Sticky side panel jQuery plugin

## Usage

```html

$(document).ready(function(){
$('#example').sticklr();
});


```

* General pattern: `ul > li > a[+ul > li a/form/table]`
* To ensure CSS3 fallback, the topmost `

    ` element must have `"sticklr"` class name
    * Create multiple column menu by adding another `
      ` element in second level
      * Add class `"sticklr-title"` in `
    • ` to create menu title

      To hide all shown menu when an event occured you can use:

      ```js
      $().sticklr('hide');
      ```

      ## Options

      | option | type | default | description |
      | --- | --- | --- | --- |
      | `animate` | `Boolean` | `false` | Define whether the sticky panel has to be animated when scrolling/resizing browser |
      | `menuHeight` | `Number` | `20` | Define the height size of a column in pixel |
      | `menuWidth` | `Number` | `180` | Define the width size of a column in pixel |
      | `relativeTo` | `String` | `"center"` | Define vertical positioning relative to the browser viewport (`top`/`middle`/`ground`) |
      | `relativeGap` | `Number` | `15` | Define the relative gap size in pixel if `relativeTo` was set to top or bottom |
      | `showOn` | `String` | `"click"` | Define event when menu must be shown. Some possible mouse events: `hover`, `click`, `dblclick` |
      | `stickTo` | `String` | `"left"` | Define placement position whether to `left` or `right` side |
      | `tabHeight` | `Number` | `16` | Define the height size of the tab |
      | `tabWidth` | `Number` | `16` | Define the width size of the tab |

      To override the default value, you can pass custom values you want to change when initialize:

      ```js
      $('#example').sticklr({
      animate : true,
      menuHeight : 20,
      menuWidth : 200,
      relativeTo : 'top',
      relativeGap : 10,
      showOn : 'hover',
      stickTo : 'right',
      tabHeight : 64,
      tabWidth : 32
      });
      ```

      ## Credits

      * Some icons used here are from icondock and pc.de

      ## License

      Dual licensed under GPLv2 & MIT

      Copyright © 2011-2012 Faisal Salman <>

      Permission is hereby granted, free of charge, to any person obtaining a copy of
      this software and associated documentation files (the "Software"), to deal in
      the Software without restriction, including without limitation the rights to use,
      copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
      Software, and to permit persons to whom the Software is furnished to do so,
      subject to the following conditions:

      The above copyright notice and this permission notice shall be included in all
      copies or substantial portions of the Software.