Tweet



 
A very easy to use, cross platform, jQuery based UI toolkit, that’s still small in size, has the features you need, and doesn’t get in your way of doing things! Put jQuery and jKit on all your pages and HTML becomes so much better. And the best thing? You really don’t have to be a programmer to create a trully amazing website! jKit has 99% of all the features you ever need. You don’t have to check out dozens of plugins, learn how to use them, only to find out they don’t work in a specific browser. And even if jKit doesn’t have that one feature you need right now, jKit is fully extendable with plugins and command replacements, all that and your API always stays the same.

Hi, stranger

jKit is growing almost daily, if you don’t find what you need, let us know with a post on the community forum or our social pages. Hey, who knows, maybe it’s already on our ToDo list.

Content Summary

jKit Button

If you like jKit, use and want to support the project, here’s a small button you can use to link to the jKit website.

Btw, if you did something really nice with jKit, send us a link to your work and if we like it, we would sure love to feature it.

Parallax command

This command lets you create a parallax effect of different layers triggered by mouse movement.

Basic Usage (HTML)

data-jkit="[parallax:strength=3;axis=both]"

Advanced Init (JavaScript)

$('#myelement').jKit('parallax', { 'strength': '3', 'axis': 'both' });

Options

OptionValuesDefaultDescription
strengthInt5How much 3D effect to use (from 1 to 10)
axis“x” or “y” or “both”xOn which axis to apply the “3D” effect
scope“global” or “local”globalFrom which base coordinate system to calculate the mouse position and parallax effect
detect“mousemove” or “scroll”mousemoveEither use the mouse position as a reference or the page scroll position

Events

This command has no events.

Examples

Text layers:

A simple example with three divs containing just text, animated on both axis:

Background Layer
Middle Layer
Foreground Layer
Source:
<div class="parallax-container" data-jkit="[parallax:strength=2;axis=both]">
	<div class="parallax parallax1">Background Layer</div>
	<div class="parallax parallax2">Middle Layer</div>
	<div class="parallax parallax3">Foreground Layer</div>
</div>

Single axis:

Here’s the same example but only the x axis is affected:

Background Layer
Middle Layer
Foreground Layer
Source:
<div class="parallax-container" data-jkit="[parallax:strength=2;axis=x]">
	<div class="parallax parallax1">Background Layer</div>
	<div class="parallax parallax2">Middle Layer</div>
	<div class="parallax parallax3">Foreground Layer</div>
</div>

Bigger sensibility:

Again the initiall example, but this time with bigger mouse sensitivity:

Background Layer
Middle Layer
Foreground Layer
Source:
<div class="parallax-container" data-jkit="[parallax:strength=7;axis=both]">
	<div class="parallax parallax1">Background Layer</div>
	<div class="parallax parallax2">Middle Layer</div>
	<div class="parallax parallax3">Foreground Layer</div>
</div>

Local scope:

Again the initiall example, but this time we use a local scope:

Background Layer
Middle Layer
Foreground Layer
Source:
<div class="parallax-container" data-jkit="[parallax:strength=2;axis=both;scope=local]">
	<div class="parallax parallax1">Background Layer</div>
	<div class="parallax parallax2">Middle Layer</div>
	<div class="parallax parallax3">Foreground Layer</div>
</div>

Scroll detection:

Detect the scroll position to move the different layers:

Background Layer
Middle Layer
Foreground Layer
Source:
<div class="parallax-container" data-jkit="[parallax:strength=2;axis=both;detect=scroll]">
	<div class="parallax parallax1">Background Layer</div>
	<div class="parallax parallax2">Middle Layer</div>
	<div class="parallax parallax3">Foreground Layer</div>
</div>

Example CSS

div.parallax-container {
	position: relative;
	width: 100%;
	height: 250px;
	overflow: hidden;
	background: #333;
}
div.parallax-container div.parallax {
	position: absolute;
	top: 0px;
	left: 0px;
	width: 2500px;
	text-align: center;
	height: 250px;
	font-weight: bold;
}
.parallax1 {
	color: #555;
	font-size: 250px;
	line-height: 80%;
}
.parallax2 {
	color: #999;
	font-size: 100px;
	line-height: 320%;
}
.parallax3 {
	color: #fff;
	font-size: 50px;
	line-height: 760%;
}

Replacements

There are currently no replacements for this command.

[ Learn more about replacements ]

 

Discussions

Do you have questions or do you want to suggest new features? Than head over to our new community:

[ jKit Community ]