• Stars
    star
    600
  • Rank 74,640 (Top 2 %)
  • Language
    HTML
  • Created about 10 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

jQuery Off Canvas Menus and Panels Plugin

Project: scotchPanels.js - jQuery Off Canvas Menus and Panels Plugin

scotchPanel.js

scotchPanels.js is a jQuery plugin for easily creating off canvas menus, navigations, and other panel types such as images, videos, and iframes. Scotch Panels are featured-packed and have a ton of different options for every skill-level to tweak and implement into almost any project. Scotch Panels work from any container so you can put your side navigation on any element you want. It even provides excellent backwards-compatible browser support via a JavaScript fallback. Lastly, there's over 30 stripped down code samples to get you up and running in no time.


Licenses

  • Personal: $0 (free)
  • Commercial (1 site): $15
  • Commercial (Unlimited Sites): $60
  • Extended License (reselling): Contact me: [email protected]

Dead Simple Demos

Getting Started

Mobile Only

Horizontal

Vertical

Content Helpers

Event Helpers

Styles

Triggers

CSS Class Helpers

Browser Suport

Multiple Panels at Once

Advanced (cool things)


Other Features

  • Uses CSS3 with JavaScript Fallback
  • Fully Responsive
  • Custom transition styles
  • Completely Customizable with tons of optional settings
  • Lightweight, easy to use, and only one file
  • Cross Browser Support
  • Open Source
  • Choose either custom HTML, images, iframes, or video panels
  • Optionally use HTM5 Data Attributes
  • Off Canvas directions from top, Bottom, left, and right
  • Works from any container or div
  • Extensive Callbacks API
  • Click, touch, hover, and keyboard helpers
  • CSS Class Helpers

GETTING STARTED THE EASY WAY

Add scotchPanels.js

After jQuery, add the scotchPanels.js file.

<script src="http://example.com/js/scotchPanels.js">

Step 2: Pick the Container

Decide on the container that you want your Panel to come out of. Try to pick a container that doesn't have any padding in the direction of where the Panel will be coming out of.

Step 3: Add Your Panel's Markup inside of that Container

You'll want to add this markup inside of that container. If you are building a side navigation, put this directly below the opening body tag. If you want your panel inside of a custom div or wrapper, put it inside of that div.

<div id="panel-example">
    <h2>Whatever you want in your panel</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maiores, blanditiis.</p>
</div>

Step 3: Add a button to toggle the Panel

This demo is showing how to create a click event, but you can tie opening and closing toggles to whatever events you want.

<a href="#" class="toggle-panel">Toggle Panel</a>

Step 4: Initialize and Configure

In either a JavaScript file or inline, initalize the Panel. This has to be below the scotchPanels.js file. Some of the following settings below are defaults, and are only added for demonstration purposes.

$('#panel-example').scotchPanel({
    containerSelector: 'body', // As a jQuery Selector
    direction: 'left', // Make it toggle in from the left
    duration: 300, // Speed in ms how fast you want it to be
    transition: 'ease', // CSS3 transition type: linear, ease, ease-in, ease-out, ease-in-out, cubic-bezier(P1x,P1y,P2x,P2y)
    clickSelector: '.toggle-panel', // Enables toggling when clicking elements of this class
    distanceX: '70%', // Size fo the toggle
    enableEscapeKey: true // Clicking Esc will close the panel
});

Getting Started the Dev Way

Step 1: Add scotchPanels.js

Feel free to use a front-end pakage manager like Bower.

<script src="http://example.com/js/scotchPanels.js">

Step 2: Add Your Panel's Markup

Make sure this is inside of the container you want this to slide out of.

<div id="panel-example">
    <h2>Whatever you want in your panel</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maiores, blanditiis.</p>
</div>

Step 3: Initialize, configure, and return

This is very similar to the easy way, except you'll be returning the function as an object to be able to integrate into your front-end code and logic.

var panelExample = $('#panel-example').scotchPanel({
    containerSelector: 'body', // Make this appear on the entire screen
    direction: 'left', // Make it toggle in from the left
    duration: 300, // Speed in ms how fast you want it to be
    transition: 'ease', // CSS3 transition type: linear, ease, ease-in, ease-out, ease-in-out, cubic-bezier(P1x,P1y,P2x,P2y)
    clickSelector: '.toggle-panel', // Enables toggling when clicking elements of this class
    distanceX: '70%', // Size fo the toggle
    enableEscapeKey: true // Clicking Esc will close the panel
});

Step 4: Do dev things

You can now open, close, and toggle the panel however you want. You have full control to tie it to whatever events you want.

panelExample.open() // Opens the Panel
panelExample.toggle() // Toggles the Panel
panelExample.close() // Closes the Panel

Getting Started the HTML5 Way

Step 1: Add scotchPanels.js

After jQuery, add the scotchPanels.js file.

<script src="http://example.com/js/scotchPanels.js">

Step 2: Add Your Panel's Markup with HTML5 Data Attribtues

Add the configuration options as data-attributes to your markup

<div id="lefty" class="panelize-meeeee" data-containerSelector="body" data-direction="left" data-clickSelector=".toggle-panel-1">
    <h2>Whatever you want in your panel</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maiores, blanditiis.</p>
</div>

<div id="righty" class="panelize-meeeee" data-containerSelector="body" data-direction="right" data-clickSelector=".toggle-panel-2">
    <h2>Whatever you want in your panel</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maiores, blanditiis.</p>
</div>

Step 3: Add Toggle Buttons

Or other events to toggle the Scotch Panels.

<a href="#" class="toggle-panel-1">Toggle Panel 1</a>
<a href="#" class="toggle-panel-2">Toggle Panel 2</a>

Step 4: Initialize and Configure

// Minimum Required Initiation of Panel
/* $('.panlize-meeeee').scotchPanel(); */

// Combination of Data Attributes and Options
$('.panelize-meeeee').scotchPanel({
    direction: 'top', // Will be overwritten by the Data Attributes
    duration: 150 // Will apply to both
});

Issues or Bugs

Please report issues! Thanks for checking it out and supporting scotch.io!

More Repositories

1

scotch-box

Scotch Box is a preconfigured Vagrant Box with a full array of LAMP Stack features to get you up and running with Vagrant in no time.
PHP
2,702
star
2

easy-node-authentication

Code for the entire scotch.io tutorial series: Complete Guide to Node Authentication
JavaScript
1,359
star
3

All-Github-Emoji-Icons

A repo of every emoji icon as a separate file and commit.
Shell
1,038
star
4

node-todo

A simple Node/MongoDB/Angular todo app
JavaScript
723
star
5

react-tweets

Code repository for the tutorial by @kenwheeler: Build A Real-Time Twitter Stream with Node and React.js
JavaScript
697
star
6

starter-node-angular

A starter kit for Node and Angular Single Page Apps
JavaScript
482
star
7

mean-machine-code

Code samples for the book: MEAN Machine
JavaScript
459
star
8

node-api

Building a RESTful API Using Node and Express 4
JavaScript
454
star
9

node-token-authentication

Code for the scotch.io tutorial: Authenticate a Node API Using JSON Web Tokens
JavaScript
365
star
10

node-web-scraper

Code for the tutorial: Scraping the Web With Node.js by @kukicado
JavaScript
272
star
11

react-flux-cart

Code for the tutorial by @kenwheeler: Create a Shopping Cart Using React.js and Flux
JavaScript
263
star
12

laravel-angular-comment-app

Code for the scotch.io tutorial: Laravel and Angular Single Page Application: A Commenting System
PHP
216
star
13

Pure-CSS3-Star-Wars-Lightsaber-Checkboxes

Pure CSS3 Star Wars Lightsaber Checkboxes.
210
star
14

meteor-slack

Code for the scotch.io tutorial by Daniel (danyll.com)
CSS
205
star
15

vue-starter-course

Code for the scotch.io course: Getting Started with Vue
HTML
123
star
16

Bootstrap-Media-Query-Breakpoints

CSS
118
star
17

javascript-starter-course

Code for the Scotch School course by @sevilayha
HTML
118
star
18

simple-laravel-crud

Code for the scotch.io article: Simple Laravel CRUD with Resource Controllers
PHP
110
star
19

scotch-io.github.io

An Open-Source Bootstrap 3 Jekyll Theme by Scotch
HTML
108
star
20

html-css-website-course

Build a beatiful HTML/CSS website. Code for the scotch.io course.
HTML
98
star
21

gulp-and-less-starter-kit

Starter kit to use Gulp with Less. Features Bootstrap 3, minify, lint, and watch.
HTML
90
star
22

ajax-forms-jquery

Code for the scotch.io tutorial: Submitting AJAX Forms with jQuery
JavaScript
88
star
23

vuejs-github-explorer

This is the repository for the code from the blog post "Create a Github File Explorer Using Vue.js"
JavaScript
87
star
24

scotch-box-pro

Scotch Box Pro is a preconfigured Vagrant Box with a full array of LAMP Stack features to get you up and running with Vagrant in no time.
Hack
77
star
25

node-ejs

Using EJS to template a Node application.
JavaScript
69
star
26

gulp-getting-started

CSS
67
star
27

submitting-forms-angular

Code for the scotch.io tutorial: Submitting AJAX Forms: The AngularJS Way
HTML
67
star
28

laravel-angular-time-tracker

Code for the scotch.io tutorial by @chenkie
PHP
66
star
29

building-and-securing-a-modern-backend-api

HTML
63
star
30

react-redux-bookshop

React Redux Demo
JavaScript
61
star
31

angular2-starter-basic

A super simple starter kit for Angular 2 apps.
JavaScript
61
star
32

javascript-modal

Building your own JavaScript Modal by Ken Wheeler
JavaScript
59
star
33

node-webkit-chat

Source for scotch char article
JavaScript
55
star
34

angular-2-form-validation

Angular 2 Form Validation Demo App
TypeScript
51
star
35

react-routing

JavaScript
50
star
36

stencil

Stencil is an awesome and simple templating engine for Codeigniter.
PHP
46
star
37

scrollmagic-starter-templates

ScrollMagic Starter Templates
CSS
46
star
38

angular2-starter-course

Code for the Scotch School course: Getting Started with Angular 2
TypeScript
45
star
39

simple-laravel-login-authentication

Code for the scotch.io article: Simple and Easy Laravel Login Authentication
PHP
43
star
40

laravel-cashier-course

Code for the Scotch School course: Build a Monthly Subscription App with Laravel Cashier
PHP
43
star
41

scotch-box-build-scripts

These are the build scripts that come with purchasing access to Scotch Box Pro.
Shell
41
star
42

node-website-course

Code for the Scotch School course by @hollylawly: Build Your First Node.js Website
HTML
40
star
43

node-booklet-code

Code for the scotch.io eBook: Build Your First Node Application
JavaScript
38
star
44

angular-seo-prerender

Code for the scotch.io tutorial: AngularJS SEO with Prerender.io
HTML
38
star
45

heroku-node

Code for the tutorial by @sevilayha: Deploying Node Apps to Heroku
JavaScript
37
star
46

node-crud-course

JavaScript
37
star
47

angular2-http-course

Code for the Scotch School course by @sevilayha: Angular 2 HTTP and Observables
TypeScript
37
star
48

angular2-routing-course

Code for the Scotch School course: Routing Angular 2 Applications
TypeScript
36
star
49

animatecss-page-landing

Code for the scotch.io article: CSS3 Page Landing Animations
JavaScript
36
star
50

laravel-eloquent-guide

Code for the scotch.io tutorial: A Guide to Using Eloquent ORM in Laravel
PHP
34
star
51

how-to-build-a-wordpress-plugin-part-1

PHP
30
star
52

CSS-mixins

SASS and LESS Mixins to simplify cross browser compatibility and make CSS3 properties easier to use.
CSS
30
star
53

laravel-queues

PHP
30
star
54

scotch-box-pro-nginx

Scotch Box Pro (NGINX) is a preconfigured Vagrant Box with a full array of LEMP Stack features to get you up and running with Vagrant in no time.
PHP
30
star
55

sails-angular-todo

JavaScript
30
star
56

express-router-experiments

Experiments with Express 4.0's Router
JavaScript
27
star
57

meteor-polling

Code for the scotch.io tutorial by @sevilayha
HTML
26
star
58

10-percent-too-dull-for-my-tastes

For fun Color Scheme by Scotch.io for your Sublime Text 3 Editor
23
star
59

color-monster

Calculating color schemes using lightness and darkness.
JavaScript
22
star
60

angular-etsy-stamplay

Code for the 3 part tutorial on scotch.io by @sevilayha
JavaScript
21
star
61

angular2-universal

TypeScript
19
star
62

express-parameters

Code for the tutorial by @sevilayha: Use ExpressJS to Get URL and POST Parameters
JavaScript
19
star
63

metrostrap

Front-end framework for super fast web development.
18
star
64

laravel-emails

PHP
18
star
65

zurb-ink-starter

Starter kit for building responsive emails with Zurb Ink. Check out the full article here: https://scotch.io/tutorials/building-responsive-email-templates-with-ink
HTML
17
star
66

pomodoro-on-the-rocks

A simple and beautiful Pomodoro timer.
CSS
16
star
67

Star-Wars-Attack-of-the-DOM

Star Wars: Attack of the DOM. A cool little demonstration of HTML5, CSS3, and JS combined to make lightsabers attack your webpages! Star Wars javascript physics.
CSS
16
star
68

react-router-course

JavaScript
16
star
69

Github-API-Library-For-CodeIgniter

Simple Github library for CodeIgniter. Supports GitHub OAuth API and all the other cool little functions and calls they have.
PHP
16
star
70

express-sendfile

Code for the tutorial by @sevilayha: Use ExpressJS to Deliver HTML Files
JavaScript
14
star
71

node-starter-course

Code for the Scotch School course: Getting Started with Node.js
JavaScript
14
star
72

node-cloudinary-instagram

Image backend with Cloudinary sample
HTML
13
star
73

vscode-course

Code for the Scotch School course by @sevilayha
JavaScript
11
star
74

angular2-forms-course

Code for the Scotch School course by @sevilayha: Angular 2 Forms and Validation
TypeScript
11
star
75

jquery-for-total-noobs

Project files for jQuery for Total Noobs - https://nonoobleftbehind.com
HTML
11
star
76

how-to-build-a-wordpress-plugin-part-2

PHP
11
star
77

laravel-shoutbox

A simple shoutbox that demonstrates laravel event broadcasting
PHP
10
star
78

vue-deepstream-crud

Realtime CRUD App Demo with Vue and deepstream
JavaScript
10
star
79

sass-course

The starter course for Sass
CSS
10
star
80

atlas-lamp-tutorial

Shell
10
star
81

laravel-auth-jwt-entrust

PHP
10
star
82

laravel-caching

Code for the scotch.io tutorial: Caching RESTful Resources in Laravel
PHP
10
star
83

react-universal-next

Next example
JavaScript
9
star
84

laravel-relationships-course

PHP
7
star
85

angular-gif-course

Code for the scotch.io course: Building an Angular Gif Battle Site
TypeScript
7
star
86

node-routing-course

JavaScript
7
star
87

gulp-starter-course

HTML
6
star
88

filepicker-face-mash

Filepicker demo app to build a wall of user uploads. - https://scotch.io/tutorials/handling-file-uploads-painlessly-with-filepicker
HTML
6
star
89

laravel-form-validation

PHP
6
star
90

mean-grunt

Using Grunt to automate a MEAN stack application.
JavaScript
6
star
91

front-end-slicing-starter

A super easy out-of-the-box setup for prepocessing SASS or LESS.
JavaScript
5
star
92

angular-lazyload

Demo and tutorial of Angular lazy loading
TypeScript
5
star
93

first-vue-website

Vue
5
star
94

less-starter-course

Code for the Scotch School course: Getting Started with Less https://scotch.io/courses/getting-started-with-less
CSS
5
star
95

jquery-to-vue-webinar

Code for the webinar: Going from jQuery to Vue
HTML
5
star
96

laravel-templating-course

PHP
5
star
97

angular-activate-guards

Angular Router. CanActivate/CanActivateChild demo.
TypeScript
5
star
98

angular-forms

PHP
5
star
99

css-transitions-course

CSS
4
star
100

angular2-algolia-search

This is a test currently. Will be updated as a full course for Scotch School soon.
JavaScript
4
star