Browse files

Initial GitHub release

  • Loading branch information...
stefangabos committed Dec 7, 2013
0 parents commit b38df9d7589dadc3bc195a7bb0a8e08c7756e993
Showing with 4,467 additions and 0 deletions.
  1. +3 −0 .gitignore
  2. +49 −0 Gruntfile.js
  3. +74 −0
  4. +1 −0 changelog.txt
  5. +1 −0 documentation.txt
  6. +146 −0 examples/index.html
  7. +8 −0 examples/libraries/index.html
  8. +165 −0 examples/libraries/syntaxhighlighter/LGPL-LICENSE
  9. +20 −0 examples/libraries/syntaxhighlighter/MIT-LICENSE
  10. +8 −0 examples/libraries/syntaxhighlighter/index.html
  11. +8 −0 examples/libraries/syntaxhighlighter/public/css/index.html
  12. +324 −0 examples/libraries/syntaxhighlighter/public/css/shCoreDefault.css
  13. +8 −0 examples/libraries/syntaxhighlighter/public/index.html
  14. +654 −0 examples/libraries/syntaxhighlighter/public/javascript/XRegExp.js
  15. +8 −0 examples/libraries/syntaxhighlighter/public/javascript/index.html
  16. +91 −0 examples/libraries/syntaxhighlighter/public/javascript/shBrushCss.js
  17. +52 −0 examples/libraries/syntaxhighlighter/public/javascript/shBrushJScript.js
  18. +69 −0 examples/libraries/syntaxhighlighter/public/javascript/shBrushXml.js
  19. +1,721 −0 examples/libraries/syntaxhighlighter/public/javascript/shCore.js
  20. +406 −0 examples/public/css/normalize.css
  21. +49 −0 examples/public/css/style.css
  22. +8 −0 examples/public/javascript/index.html
  23. +6 −0 examples/public/javascript/jquery-1.10.2.js
  24. +29 −0 examples/public/javascript/main.js
  25. +165 −0 license.txt
  26. +35 −0 package.json
  27. +1 −0 public/javascript/zebra_pin.js
  28. +319 −0 public/javascript/zebra_pin.src.js
  29. +1 −0 readme.txt
  30. +38 −0 zebra-pin.jquery.json
@@ -0,0 +1,3 @@
@@ -0,0 +1,49 @@
module.exports = function(grunt) {
var source_files = ['public/javascript/zebra_pin.src.js'];
pkg: grunt.file.readJSON('package.json'),
// configure plugins
'uglify': {
options: {
build: {
src: source_files,
dest: 'public/javascript/zebra_pin.js'
'jshint': {
files: source_files,
options: {
indent: 4,
quotmark: 'single',
strict: true,
trailing: false,
loopfunc: true,
scripturl: true
'watch': {
files: source_files,
tasks: ['jshint', 'uglify']
// register plugins
// register tasks
grunt.registerTask('default', ['jshint', 'uglify']);
@@ -0,0 +1,74 @@
####A lightweight jQuery plugin for pinning any element to the page or to a container element
Zebra_Pin is a lightweight (less than 2KB minified) and adaptive jQuery plugin for pinning any element to the page or to a container element, so that the element stays visible even if the user scrolls the page. This type of elements are also referred to as "fixed position elements" or "sticky elements".
You can use it in your projects to create sticky sidebars, sticky navigation, sticky headers and footers, or anything else you feel the need to make it stick to the page while the user scrolls.
When elements become pinned a CSS class will be added to them, as specified by the plugin's "class_name" property.
Note that this plugin will alter the target element(s) "position" property to "absolute" and/or "fixed", depending on the situation, so before calling the plugin make sure that this change will not affect your page's layout.
- elements can be pinned inside a container element, not just to the page
- it is small – it weights around 2KB minified offering the best ratio of features per used bytes
- it’s cross-browser – works in every major browser
## Requirements
Zebra_Pin has no dependencies other than jQuery 1.4.2+
## How to use
First, load the latest version of jQuery from a CDN and provide a fallback to a local source, like:
<script src="//"></script>
<script>window.jQuery || document.write('<script src="public/javascript/jquery.min.js"><\/script>')</script>
Load the Zebra_Pin jQuery plugin:
<script src="path/to/zebra_pin.js"></script>
Now, within the DOM-ready event, pin elements to page or to a container:
$(document).ready(function() {
// easiest way to get started: when the user scrolls to the element
// the element will become pinned (sticky) and will scroll with the page
new Zebra_Pin($('#myelement'));
// in the example above, the element will be at the very top edge of the
// screen. if you want to add some top margin simply set the "top_spacing"
// property
new Zebra_Pin($('#myelement'), {
top_spacing: 10
// if you want the element to be restrained to the height of the container
// element, simply set the value of the "container" property to TRUE
// (make sure the container element has its "position" set to "relative" or
// "absolute")
new Zebra_Pin($('#myelement'), {
contained: true
// or, you may want to pin an element *exactly* to the position where it's at
// and make it stay there no matter what (we'll call this a "hard" pin)
new Zebra_Pin($('#myelement'), {
hard: true
Configuration options and demos on the **[project's homepage](**
@@ -0,0 +1 @@
@@ -0,0 +1 @@
@@ -0,0 +1,146 @@
<!doctype html>
<meta charset="utf-8">
<title>Zebra_Pin examples</title>
<link rel="stylesheet" href="public/css/normalize.css" type="text/css">
<link rel="stylesheet" href="public/css/style.css" type="text/css">
<link type="text/css" rel="stylesheet" href="libraries/syntaxhighlighter/public/css/shCoreDefault.css">
<script type="text/javascript" src="libraries/syntaxhighlighter/public/javascript/XRegExp.js"></script>
<script type="text/javascript" src="libraries/syntaxhighlighter/public/javascript/shCore.js"></script>
<script type="text/javascript" src="libraries/syntaxhighlighter/public/javascript/shBrushJScript.js"></script>
<script type="text/javascript" src="libraries/syntaxhighlighter/public/javascript/shBrushXml.js"></script>
<script type="text/javascript" src="libraries/syntaxhighlighter/public/javascript/shBrushCSS.js"></script>
<script type="text/javascript">
SyntaxHighlighter.defaults['toolbar'] = false;
<div class="main-wrapper">
<h3>Zebra_Pin Demos</h3>
<div class="outer-container left">
<div class="pin-container pin1-container">
<div class="pin" id="pin1">
<h4>Pin #1</h4>
I become pinned when I am at 10px from the window's top *and* I am constrained to my parent element's height.
<button>Toggle height</button>
<div class="pin-container left">
<div class="pin" id="pin2">
<h4>Pin #2</h4>
I become pinned when I am at 10px from the window's top and I'll scroll with the document from that point onwards.
<div class="pin-container left">
<div class="pin" id="pin3">
<h4>Pin #3</h4>
I am "hard" pinned: I am pinned to my initial position, and I stay like that forever.
<div class="content left">
<p><strong>Pin #1</strong></p>
<pre class="brush:js">
pin = new $.Zebra_Pin($('#pin1'), {
top_spacing: 10,
contain: true
$container = $('.pin1-container'),
additional_height = -100;
$('button').bind('click', function() {
additional_height = additional_height * -1;
$container.css('height', '+=' + additional_height);
<p><strong>Pin #2</strong></p>
<pre class="brush:js">
new $.Zebra_Pin($('#pin2'), {
top_spacing: 10
<p><strong>Pin #3</strong></p>
<pre class="brush:js">
new $.Zebra_Pin($('#pin3'), {
hard: true
Completely leverage other's magnetic technologies without B2C e-commerce. Rapidiously implement backward-compatible portals after empowered imperatives. Globally revolutionize emerging paradigms through multifunctional internal or "organic" sources. Progressively integrate viral internal or "organic" sources rather than parallel action items. Collaboratively empower premium bandwidth without e-business core competencies.
Energistically repurpose unique data with B2B catalysts for change. Progressively parallel task cost effective services without open-source markets. Conveniently leverage existing functionalized e-tailers with integrated growth strategies. Competently target leading-edge quality vectors for resource sucking e-tailers. Globally seize strategic meta-services and bleeding-edge products.
Enthusiastically create B2B synergy before accurate data. Synergistically synergize e-business infrastructures after process-centric portals. Progressively benchmark impactful initiatives with alternative collaboration and idea-sharing. Holisticly enable goal-oriented methodologies via effective applications. Credibly engage just in time portals after focused relationships.
Objectively expedite intuitive methods of empowerment through technically sound deliverables. Authoritatively restore enterprise-wide channels via excellent interfaces. Completely re-engineer diverse relationships vis-a-vis e-business networks. Continually scale mission-critical resources and market positioning growth strategies. Continually impact extensible technologies vis-a-vis client-centered opportunities.
Collaboratively architect covalent services before economically sound e-business. Dramatically architect highly efficient mindshare and fully researched models. Energistically leverage existing resource sucking "outside the box" thinking after an expanded array of communities. Compellingly actualize fully researched e-commerce rather than installed base functionalities. Compellingly productivate tactical ideas before transparent e-business.
Enthusiastically disintermediate sustainable outsourcing for vertical channels. Seamlessly procrastinate unique e-markets via enabled solutions. Enthusiastically repurpose state of the art action items whereas user-centric quality vectors. Synergistically transform integrated potentialities after team building data. Compellingly e-enable plug-and-play infomediaries through revolutionary benefits.
Energistically strategize clicks-and-mortar core competencies with cross-unit niche markets. Intrinsicly underwhelm high-quality outsourcing after excellent total linkage. Uniquely synthesize corporate internal or "organic" sources without maintainable e-business. Compellingly incubate fully tested quality vectors vis-a-vis emerging vortals. Proactively develop reliable functionalities through adaptive functionalities.
Appropriately seize magnetic testing procedures before compelling channels. Dynamically morph team building ROI before professional opportunities. Assertively recaptiualize emerging channels via progressive results. Competently recaptiualize market positioning innovation without integrated action items. Compellingly repurpose cross-unit growth strategies via proactive e-services.
Energistically conceptualize cross functional functionalities whereas interoperable benefits. Objectively embrace virtual infrastructures for performance based networks. Rapidiously seize unique services vis-a-vis impactful paradigms. Continually simplify backend materials without global testing procedures. Synergistically morph fully researched total linkage without resource sucking infrastructures.
Dynamically scale ubiquitous core competencies rather than parallel platforms. Intrinsicly customize interdependent relationships for 24/365 e-markets. Synergistically morph extensive systems for fully tested sources. Proactively myocardinate high standards in e-business before orthogonal relationships. Progressively develop sustainable functionalities with cross-unit functionalities.
Progressively morph cross-unit bandwidth whereas front-end imperatives. Distinctively envisioneer multimedia based niches after client-based partnerships. Collaboratively unleash best-of-breed manufactured products whereas web-enabled vortals. Completely synergize efficient web services whereas global opportunities. Monotonectally deploy integrated customer service with competitive models.
Dynamically strategize leading-edge imperatives through enterprise resources. Proactively unleash efficient platforms rather than leveraged expertise. Dynamically conceptualize go forward growth strategies without installed base opportunities. Distinctively productivate team driven imperatives after cutting-edge technology. Appropriately facilitate stand-alone potentialities with resource maximizing products.
Dynamically enhance progressive data after standards compliant partnerships. Dramatically utilize extensive e-business before efficient human capital. Collaboratively disintermediate world-class imperatives rather than inexpensive applications. Continually morph distinctive convergence for client-focused growth strategies. Compellingly fashion web-enabled meta-services and clicks-and-mortar technology.
Competently build 2.0 interfaces whereas intermandated methods of empowerment. Dynamically incentivize backward-compatible expertise through an expanded array of total linkage. Phosfluorescently create enterprise-wide testing procedures via cutting-edge manufactured products. Credibly innovate process-centric deliverables without holistic networks. Proactively exploit visionary collaboration and idea-sharing through frictionless supply chains.
Continually leverage other's user friendly ROI via resource-leveling schemas. Authoritatively engineer integrated methods of empowerment with open-source channels. Dynamically build next-generation experiences without cross functional e-business. Competently optimize empowered experiences through an expanded array of information. Efficiently whiteboard distinctive resources for optimal data.
Continually parallel task top-line process improvements with exceptional action items. Compellingly plagiarize leading-edge networks without top-line total linkage. Interactively parallel task B2C processes for high-quality catalysts for change. Continually implement parallel core competencies whereas pandemic total linkage. Completely integrate leading-edge process improvements vis-a-vis 2.0 e-services.
Progressively whiteboard viral vortals rather than standardized e-services. Phosfluorescently plagiarize enterprise-wide benefits rather than process-centric testing procedures. Dramatically mesh team building imperatives and equity invested imperatives. Quickly evisculate standardized quality vectors whereas focused quality vectors. Assertively integrate emerging bandwidth after functionalized web services.
Proactively parallel task front-end customer service after impactful information. Seamlessly reintermediate covalent deliverables and future-proof results. Appropriately streamline multidisciplinary relationships whereas goal-oriented strategic theme areas. Completely procrastinate principle-centered systems and error-free vortals. Professionally coordinate mission-critical outsourcing through cross-media scenarios.
Holisticly enhance corporate customer service whereas focused strategic theme areas. Dramatically plagiarize diverse intellectual capital before resource sucking platforms. Enthusiastically redefine fully researched process improvements before low-risk high-yield best practices. Holisticly target sticky data before goal-oriented channels. Competently coordinate interdependent networks via resource-leveling value.
Monotonectally morph sustainable strategic theme areas rather than installed base content. Collaboratively morph robust meta-services via bleeding-edge process improvements. Intrinsicly embrace ethical deliverables and backward-compatible metrics. Completely pursue team building networks and sustainable catalysts for change. Energistically supply seamless channels vis-a-vis resource sucking collaboration and idea-sharing.
<script type="text/javascript" src="public/javascript/jquery-1.10.2.js"></script>
<script type="text/javascript" src="../public/javascript/zebra_pin.js"></script>
<script type="text/javascript" src="public/javascript/main.js"></script>
@@ -0,0 +1,8 @@
<title>403 Forbidden</title>
<p>Directory access is forbidden.</p>
Oops, something went wrong.

0 comments on commit b38df9d

Please sign in to comment.