commit
ced6c67fcc
@ -0,0 +1,10 @@ |
||||
tmp |
||||
html/icons |
||||
nginx |
||||
.*.swp |
||||
store/ |
||||
html/upload.js |
||||
html/application.js |
||||
html/jBreadCrumb_1.1.zip |
||||
html/upload.coffee.old |
||||
html/mime-types.json |
@ -0,0 +1,42 @@ |
||||
require 'pathname' |
||||
require 'shellwords' |
||||
|
||||
class Pathname |
||||
def shellescape |
||||
to_s.shellescape |
||||
end |
||||
end |
||||
|
||||
namespace :nginx do |
||||
task build: %w[tmp] do |t,conf| |
||||
sh './nginx.build' |
||||
end |
||||
|
||||
def call_nginx *opts |
||||
base_dir = Pathname.new( '.').expand_path |
||||
binary = base_dir.join *%w[nginx sbin nginx] |
||||
config = base_dir.join *%w[config nginx.conf] |
||||
sh "sudo #{binary.shellescape} -c #{config.shellescape} #{opts.map(&:to_s).shelljoin}" |
||||
end |
||||
|
||||
task :start do |t,conf| |
||||
call_nginx |
||||
end |
||||
|
||||
task :stop do |t,conf| |
||||
call_nginx '-s', :quit |
||||
end |
||||
|
||||
task :reload do |t,conf| |
||||
call_nginx '-s', :reload |
||||
end |
||||
end |
||||
|
||||
task :mime_types_json do |t,conf| |
||||
sh './scripts/mimetype-mapper.json.rb config/mime.types html/icons/mimetypes > html/mime-types.json' |
||||
end |
||||
|
||||
directory 'store' |
||||
directory 'tmp' |
||||
|
||||
task build: %w[nginx:build mime_types_json store] |
@ -0,0 +1,84 @@ |
||||
|
||||
types { |
||||
text/html html htm shtml; |
||||
text/css css; |
||||
text/xml xml; |
||||
image/gif gif; |
||||
image/jpeg jpeg jpg; |
||||
application/x-javascript js; |
||||
application/atom+xml atom; |
||||
application/rss+xml rss; |
||||
|
||||
text/mathml mml; |
||||
text/plain txt; |
||||
text/vnd.sun.j2me.app-descriptor jad; |
||||
text/vnd.wap.wml wml; |
||||
text/x-component htc; |
||||
|
||||
image/png png; |
||||
image/tiff tif tiff; |
||||
image/vnd.wap.wbmp wbmp; |
||||
image/x-icon ico; |
||||
image/x-jng jng; |
||||
image/x-ms-bmp bmp; |
||||
image/svg+xml svg svgz; |
||||
image/webp webp; |
||||
|
||||
application/java-archive jar war ear; |
||||
application/mac-binhex40 hqx; |
||||
application/msword doc; |
||||
application/pdf pdf; |
||||
application/postscript ps eps ai; |
||||
application/rtf rtf; |
||||
application/vnd.ms-excel xls; |
||||
application/vnd.ms-powerpoint ppt; |
||||
application/vnd.wap.wmlc wmlc; |
||||
application/vnd.google-earth.kml+xml kml; |
||||
application/vnd.google-earth.kmz kmz; |
||||
application/x-7z-compressed 7z; |
||||
application/x-cocoa cco; |
||||
application/x-java-archive-diff jardiff; |
||||
application/x-java-jnlp-file jnlp; |
||||
application/x-makeself run; |
||||
application/x-perl pl pm; |
||||
application/x-ruby rb; |
||||
application/x-python py; |
||||
application/x-python-bytecode pyc; |
||||
application/x-awk awk; |
||||
application/x-pilot prc pdb; |
||||
application/x-rar-compressed rar; |
||||
application/x-redhat-package-manager rpm; |
||||
application/x-sea sea; |
||||
application/x-shockwave-flash swf; |
||||
application/x-stuffit sit; |
||||
application/x-tcl tcl tk; |
||||
application/x-x509-ca-cert der pem crt; |
||||
application/x-xpinstall xpi; |
||||
application/xhtml+xml xhtml; |
||||
application/zip zip; |
||||
|
||||
application/octet-stream bin exe dll; |
||||
application/octet-stream deb; |
||||
application/octet-stream dmg; |
||||
application/octet-stream eot; |
||||
application/octet-stream iso img; |
||||
application/octet-stream msi msp msm; |
||||
|
||||
audio/midi mid midi kar; |
||||
audio/mpeg mp3; |
||||
audio/ogg ogg; |
||||
audio/x-m4a m4a; |
||||
audio/x-realaudio ra; |
||||
|
||||
video/3gpp 3gpp 3gp; |
||||
video/mp4 mp4; |
||||
video/mpeg mpeg mpg; |
||||
video/quicktime mov; |
||||
video/webm webm; |
||||
video/x-flv flv; |
||||
video/x-m4v m4v; |
||||
video/x-mng mng; |
||||
video/x-ms-asf asx asf; |
||||
video/x-ms-wmv wmv; |
||||
video/x-msvideo avi; |
||||
} |
@ -0,0 +1,50 @@ |
||||
#user mkv5bu; |
||||
worker_processes 10; |
||||
pid nginx.pid; |
||||
error_log logs/error.log debug; |
||||
|
||||
events { |
||||
worker_connections 768; |
||||
multi_accept on; |
||||
} |
||||
|
||||
http { |
||||
sendfile on; |
||||
tcp_nopush on; |
||||
tcp_nodelay on; |
||||
keepalive_timeout 0; |
||||
types_hash_max_size 2048; |
||||
include mime.types; |
||||
default_type application/octet-stream; |
||||
access_log logs/access.log; |
||||
error_log logs/error.log debug; |
||||
#gzip on; |
||||
#gzip_types *; |
||||
create_full_put_path on; |
||||
autoindex on; |
||||
autoindex_exact_size off; |
||||
|
||||
server { |
||||
charset utf-8; |
||||
listen 2280; |
||||
root ../store; |
||||
server_name share.local; |
||||
location /.:-==-:./ { |
||||
alias ../html/; |
||||
} |
||||
location / { |
||||
fancyindex on; |
||||
fancyindex_exact_size on; |
||||
fancyindex_header /.:-==-:./listing_header.html; |
||||
if (-d $request_filename) { |
||||
rewrite ^(.*[^/])$ $1/ break; |
||||
} |
||||
if ($request_method = MKCOL) { |
||||
rewrite ^(.*[^/])$ $1/ break; |
||||
} |
||||
dav_methods PUT DELETE MKCOL COPY MOVE; |
||||
dav_ext_methods PROPFIND OPTIONS; |
||||
client_max_body_size 256M; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,21 @@ |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<title>Error</title> |
||||
<style> |
||||
body { |
||||
width: 35em; |
||||
margin: 0 auto; |
||||
font-family: Tahoma, Verdana, Arial, sans-serif; |
||||
} |
||||
</style> |
||||
</head> |
||||
<body> |
||||
<h1>An error occurred.</h1> |
||||
<p>Sorry, the page you are looking for is currently unavailable.<br/> |
||||
Please try again later.</p> |
||||
<p>If you are the system administrator of this resource then you should check |
||||
the <a href="http://nginx.org/r/error_log">error log</a> for details.</p> |
||||
<p><em>Faithfully yours, nginx.</em></p> |
||||
</body> |
||||
</html> |
@ -0,0 +1,160 @@ |
||||
console ?= {} |
||||
console.log ?= -> |
||||
|
||||
$.fn.breadcrumb = -> |
||||
bc = $ @ |
||||
path = bc.text().split '/' |
||||
bc.empty() |
||||
path.shift() |
||||
path.pop() |
||||
bc.append " <a href='/'>/</a> " if 0 < path.length |
||||
ap = '/' |
||||
for p in path[0..-1] |
||||
ap = "#{ap}#{p}/" |
||||
bc.append " <a href='#{ap}'>#{p}/</a> " |
||||
#bc.append " #{path.slice -1}/" |
||||
bc.buttonset() |
||||
|
||||
$.fn.fancy = (obj = 'html') -> |
||||
$t = $ @ |
||||
$o = $ obj |
||||
f = $.cookie 'fancy' |
||||
$t.button().on 'change', (e) -> |
||||
e.preventDefault() |
||||
ch = $t.is(':checked') |
||||
$o.toggleClass 'fancy', ch |
||||
$.cookie 'fancy', (if ch then '1' else '0'), path: '/' |
||||
console.log 'fancy:', $.cookie('fancy'), ch |
||||
console.log 'fancy?', f, $t.is(':checked') |
||||
$t.click() if $t.is(':checked') != ('1' == f) |
||||
$o.toggleClass 'fancy', $t.is(':checked') |
||||
|
||||
$.fn.icon = (($) -> |
||||
root = (filename = null) -> |
||||
$t = $ @ |
||||
filename ?= $t.attr( 'data-filename') ? $t.attr( 'href') |
||||
type = |
||||
if /\/$/.test filename |
||||
'inode/directory' |
||||
else |
||||
ext = /\.([^.]*)$/.exec filename |
||||
if ext |
||||
ext = ext[1] |
||||
root.mime_types[ext] |
||||
type ?= 'unknown' |
||||
icon = root.mime_type_icons[type] |
||||
$img = $ '<img>' |
||||
$img.attr 'src', "/.:-==-:./icons/mimetypes/#{icon}" |
||||
$t.prepend $img |
||||
|
||||
root.mime_types = {} |
||||
root.mime_type_icons = {} |
||||
root |
||||
)(jQuery) |
||||
|
||||
$.fn.iconify = (($) -> |
||||
root = -> |
||||
$tr = $ @ |
||||
$a = $tr.children('td:first-child').children 'a' |
||||
href = $a.attr 'href' |
||||
$a.icon() |
||||
menu = $('<td>').appendTo $tr |
||||
$('<a data-method="delete">✖</a>').appendTo(menu).on 'click', root.destroy |
||||
# $('<a data-method="mark">✔</a>').appendTo(menu).on 'click', root.mark |
||||
menu.buttonset().children('a').attr href: href |
||||
@ |
||||
|
||||
root.destroy = (e) -> |
||||
$t = $ @ |
||||
e.preventDefault() |
||||
deleted = (e) -> $t.parent().parent().remove() |
||||
uri = $t.attr 'href' |
||||
if confirm "Delete #{uri}?" |
||||
$.ajax url: uri, method: 'delete', success: deleted |
||||
false |
||||
|
||||
root.mark = (e) -> |
||||
$t = $ @ |
||||
e.preventDefault() |
||||
$t.parent().parent().toggleClass 'marked' |
||||
false |
||||
|
||||
root |
||||
)(jQuery) |
||||
|
||||
$ -> |
||||
$.getJSON '/.:-==-:./mime-types.json', (data, textStatus, xhr) -> |
||||
i = $.fn.icon |
||||
i.mime_types = data.types |
||||
i.mime_type_icons = data.icons |
||||
i.mime_type_icons['inode/directory'] = 'inode-directory.png' |
||||
i.mime_type_icons['unknown'] = 'unknown.png' |
||||
$(a).iconify() for a in $('#list tbody tr') |
||||
@ |
||||
$ -> $('#fancy-toggle').fancy() |
||||
$ -> $('#breadcrumb').appendTo('header').breadcrumb() |
||||
$ -> |
||||
for tr in $('#list tr') |
||||
$tr = $ tr |
||||
t = $tr.children( 'td:nth-child(2)').text() |
||||
$tr.addClass 'dir' if '-' == t |
||||
@ |
||||
|
||||
# for drop-events needed! |
||||
$ -> $.event.props.push "dataTransfer" |
||||
|
||||
$.upload = (-> |
||||
root = (file) -> |
||||
if root.window and root.window.opener |
||||
uw = root.window |
||||
if root.ready |
||||
root.upload file |
||||
return @ |
||||
else |
||||
root.ready = false |
||||
uw = root.window = window.open '', 'upload_dialog', |
||||
'menubar=no,dependent=no,status=no,toolbar=no,location=no,width=480,height=320,top=64,left=64' |
||||
if uw.location and -1 == uw.location.href.indexOf( '/.:-==-:./upload.html') |
||||
uw.location.href = '/.:-==-:./upload.html' |
||||
else |
||||
root.ready = true |
||||
root.upload file |
||||
return @ |
||||
root.queue.push file |
||||
uw.focus() |
||||
|
||||
root.upload = (file) -> |
||||
uw = root.window |
||||
uw.jQuery( uw.document).trigger 'upload', [file, window.location.pathname] |
||||
|
||||
root.queue = [] |
||||
root.loaded = (e) -> |
||||
root.ready = true |
||||
root file while file = root.queue.pop() |
||||
|
||||
root.finished = (e) -> |
||||
$('#menu').append( '<span>Dir was changed, reload to see changes!</span>') |
||||
|
||||
root.activate = -> |
||||
$(document).on upload_window_ready: root.loaded, uploaded: root.finished |
||||
root |
||||
)() |
||||
$ -> $.upload.activate() |
||||
|
||||
$ -> |
||||
drag = (e) -> |
||||
console.log 'drag', e.type, e |
||||
e.stopPropagation() |
||||
e.preventDefault() |
||||
$(document).toggleClass 'draghover', 'draghover' == e.type |
||||
false |
||||
drop = (e) -> |
||||
drag e |
||||
files = e.target.files || e.dataTransfer.files |
||||
console.log 'droped', files |
||||
$.upload file for file in files |
||||
$('#upload-file').on 'change', drop |
||||
$('body').on |
||||
dragover: drag |
||||
dragleaver: drag |
||||
drop: drop |
@ -0,0 +1,132 @@ |
||||
/* general styles */ |
||||
html { |
||||
background: white; |
||||
color: black; |
||||
margin: 0; |
||||
font-family: "Source Code Sans", Helvetica, Arial, sans-serif; |
||||
font-size: 0.7em; |
||||
overflow-y: scroll; |
||||
} |
||||
a, a:visited { |
||||
color: gray; |
||||
text-decoration: none; |
||||
} |
||||
a:hover, a:focus { |
||||
color: black; |
||||
} |
||||
|
||||
/* listing window */ |
||||
html.fancy #list { display: block } |
||||
html.fancy #list thead { display: none } |
||||
html.fancy #list tbody { display: block } |
||||
html.fancy #list tbody tr { |
||||
display: inline-block; |
||||
width: 8em; |
||||
height: 9.5em; |
||||
overflow: hidden; |
||||
margin: 0.2em; |
||||
padding: 0.2em; |
||||
border-radius: 1em; |
||||
position: relative; |
||||
} |
||||
html.fancy #list tbody tr:hover { |
||||
background: #ddd; |
||||
overflow: initial; |
||||
} |
||||
html.fancy #list tbody tr.marked { background: #afa; } |
||||
html.fancy #list tbody td { |
||||
display: block; |
||||
text-align: center; |
||||
} |
||||
html.fancy #list tbody tr:not(:hover) td:not(:first-child) { display: none } |
||||
html.fancy #list tbody td:last-child { |
||||
position: absolute; |
||||
top: -0.5em; |
||||
right: -0.5em; |
||||
z-index: 500; |
||||
} |
||||
html.fancy #list tbody td:last-child a { |
||||
/*padding: 0.3em; |
||||
background: black; |
||||
color: white; |
||||
border-radius: 0.5em; |
||||
height: 1em; |
||||
line-height: 1em;*/ |
||||
opacity: 0.5; |
||||
} |
||||
html.fancy #list tbody td:last-child a:hover { |
||||
opacity: initial; |
||||
} |
||||
html.fancy #list tbody td:first-child img { |
||||
max-width: 5em; |
||||
max-height: 5em; |
||||
display: block; |
||||
margin-right: auto; |
||||
margin-left: auto; |
||||
} |
||||
html.listing-window body { |
||||
margin-top: 3em; |
||||
} |
||||
html.listing-window header { |
||||
position: fixed; |
||||
top: 0; |
||||
right: 0; |
||||
left: 0; |
||||
height: 3em; |
||||
background: gray; |
||||
padding: 0 1em; |
||||
box-sizing: border-box; |
||||
border-bottom: black solid 1px; |
||||
z-index: 900; |
||||
} |
||||
html.listing-window header>* { |
||||
display: inline-block; |
||||
margin: 0; |
||||
padding: 0; |
||||
} |
||||
#upload-form { display: inline-block; } |
||||
#breadcrumb { font-size: 1em; } |
||||
#breadcrumb a, #breadcrumb a:visited { color: black; } |
||||
html:not(.fancy) #list tbody tr td + td + td { |
||||
border-left: 1px solid gray; |
||||
} |
||||
html:not(.fancy) #list tbody tr td:first-child { |
||||
border-right: 1px solid gray; |
||||
} |
||||
#list tbody tr td:nth-child(2) { text-align: right } |
||||
#list tbody tr td:nth-child(2):after { content: 'B' } |
||||
#list tbody tr.dir td:nth-child(2) { visibility: hidden } |
||||
html.fancy #list tbody tr.dir td:nth-child(2) { display: none } |
||||
#list tbody tr:first-child, html.fancy #list tbody tr:first-child { display: none } |
||||
#list tbody tr td:first-child img { display: none } |
||||
#menu { |
||||
position: absolute; |
||||
top: 0; |
||||
right: 1em; |
||||
} |
||||
/*#fancy-toggle { color: red; }*/ |
||||
/*html.fancy #fancy-toggle { color: green; } */ |
||||
|
||||
/* upload window */ |
||||
html.upload-window #uploads { |
||||
margin: 0; |
||||
padding: 0; |
||||
} |
||||
html.upload-window #uploads li { |
||||
margin: 0; |
||||
padding: 0.4em; |
||||
list-style: none; |
||||
} |
||||
html.upload-window #uploads li.active { |
||||
border: white 1px solid; |
||||
background: #aaf; |
||||
} |
||||
html.upload-window #uploads progress { |
||||
width: 100%; |
||||
} |
||||
html.upload-window #uploads li.finished { |
||||
background: white; |
||||
} |
||||
html.upload-window #uploads li:hover { |
||||
background: #afa; |
||||
} |
File diff suppressed because one or more lines are too long
@ -0,0 +1,25 @@ |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<title>Welcome to nginx!</title> |
||||
<style> |
||||
body { |
||||
width: 35em; |
||||
margin: 0 auto; |
||||
font-family: Tahoma, Verdana, Arial, sans-serif; |
||||
} |
||||
</style> |
||||
</head> |
||||
<body> |
||||
<h1>Welcome to nginx!</h1> |
||||
<p>If you see this page, the nginx web server is successfully installed and |
||||
working. Further configuration is required.</p> |
||||
|
||||
<p>For online documentation and support please refer to |
||||
<a href="http://nginx.org/">nginx.org</a>.<br/> |
||||
Commercial support is available at |
||||
<a href="http://nginx.com/">nginx.com</a>.</p> |
||||
|
||||
<p><em>Thank you for using nginx.</em></p> |
||||
</body> |
||||
</html> |
@ -0,0 +1,12 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<projectDescription> |
||||
<name>jQuery Plugins</name> |
||||
<comment></comment> |
||||
<projects> |
||||
</projects> |
||||
<buildSpec> |
||||
</buildSpec> |
||||
<natures> |
||||
<nature>com.aptana.ide.project.nature.web</nature> |
||||
</natures> |
||||
</projectDescription> |
@ -0,0 +1,208 @@ |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
||||
<title>CompareNetworks jQuery'd Bread Crumb - jBreadCrumb</title> |
||||
<link rel="stylesheet" href="Styles/Base.css" type="text/css"> |
||||
<link rel="stylesheet" href="Styles/BreadCrumb.css" type="text/css"> |
||||
<script src="js/jquery.js" type="text/javascript" language="JavaScript"> |
||||
</script> |
||||
<script src="js/jquery.easing.1.3.js" type="text/javascript" language="JavaScript"> |
||||
</script> |
||||
<script src="js/jquery.jBreadCrumb.js" type="text/javascript" language="JavaScript"> |
||||
</script> |
||||
<script type="text/javascript"> |
||||
jQuery(document).ready(function() |
||||
{ |
||||
jQuery("#breadCrumb0").jBreadCrumb(); |
||||
jQuery("#breadCrumb1").jBreadCrumb(); |
||||
jQuery("#breadCrumb2").jBreadCrumb(); |
||||
jQuery("#breadCrumb3").jBreadCrumb(); |
||||
}) |
||||
</script> |
||||
</head> |
||||
<body> |
||||
<div id="container"> |
||||
<h1>CompareNetworks jQuery'd Bread Crumb - jBreadCrumb</h1> |
||||
<!-- Bread Crumb Code - Be sure to include the chevronOverlay element so we can load the semi transparend png --> |
||||
<div class="breadCrumbHolder module"> |
||||
<div id="breadCrumb0" class="breadCrumb module"> |
||||
<ul> |
||||
<li> |
||||
<a href="#">Home</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Biocompare Home</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Product Discovery</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Life Science Products / Laboratory Supplies</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Kits and Assays</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Mutagenesis Kits</a> |
||||
</li> |
||||
<li> |
||||
Mutation Generation System™ |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
<div class="breadCrumbHolder module"> |
||||
<div id="breadCrumb1" class="breadCrumb module"> |
||||
<ul> |
||||
<li> |
||||
<a href="#">Home</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Biocompare Home</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Product Discovery</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Life Science Products / Laboratory Supplies</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Kits and Assays</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Mutagenesis Kits</a> |
||||
</li> |
||||
<li> |
||||
Mutation Generation System™ Kit (MGS™ Kit) from Finnzymes Oy |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
<div class="breadCrumbHolder module"> |
||||
<div id="breadCrumb2" class="breadCrumb module"> |
||||
<ul> |
||||
<li> |
||||
<a href="#">Home</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Biocompare Home</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Product Discovery</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Life Science Products / Laboratory Supplies</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Kits and Assays</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Mutagenesis Kits</a> |
||||
</li> |
||||
<li> |
||||
Mutation Generation System™ Kit (MGS™ Kit) from Finnzymes Oy. Ok, let's get ridiculously long here, we all know it happens. |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
<div class="breadCrumbHolder module"> |
||||
<div id="breadCrumb3" class="breadCrumb module"> |
||||
<ul> |
||||
<li> |
||||
<a href="#">Home</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Biocompare Home</a> |
||||
</li> |
||||
<li> |
||||
Mutation Generation System™ |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
<div class="chevronOverlay main"> |
||||
</div> |
||||
<!-- End Bread Crumb Code --> |
||||
<div class="writeup module"> |
||||
<div class="description"> |
||||
<h2>Explanation</h2> |
||||
<p> |
||||
This collapsible breadcrumb was developed to deal with deeply nested, verbosely named pages. Rather than limit the amount of elements shown on the sever side, we decided to go with a client side solution for usability and SEO reasons. It also turned out nice to look at and fun to play with. |
||||
</p> |
||||
<p> |
||||
It is smart in the sense that it collapses based upon the amount and length of the elements in the set. The breadcrumb uses a semitransparent .png overlay to achieve the gradient effect seen on the elements. Visually, it helps to show a "peek" at what is underneath. |
||||
</p> |
||||
<p> |
||||
Oh, and it's compatible with ie 6, ie 7 and all standards compliant browsers. |
||||
</p> |
||||
<p> |
||||
To use the plugin, it's as simple as the code below. |
||||
</p> |
||||
<pre>jQuery(document).ready(function() |
||||
{ |
||||
jQuery("#breadCrumb").jBreadCrumb(); |
||||
})</pre> |
||||
<p> |
||||
The only additional jQuery plugin required is the <a href="http://gsgd.co.uk/sandbox/jquery/easing/" title="jQuery Easing">easing plugin</a> |
||||
written by GSGD. The plugin uses Robert Penner's wonderful easing equations that anyone from a flash background is familiar with, I love 'easeOutQuad', it makes things so smooooth. |
||||
</p> |
||||
<p> |
||||
If you don't want to use the plugin, set the options to use the normal "swing" (esentially "easeInOut") or "linear" easing provided by jQuery. The easing equations will no longer be necessary. |
||||
</p> |
||||
<pre>jQuery(document).ready(function() |
||||
{ |
||||
jQuery("#breadCrumb").jBreadCrumb({easing:'swing'}); |
||||
}) |
||||
</pre> |
||||
<p> |
||||
Or, set it globally |
||||
</p> |
||||
<pre> |
||||
jQuery.fn.jBreadCrumb.defaults.easing = 'linear'; |
||||
</pre> |
||||
<p> |
||||
There are a lot of options in there, you can adjust many of the features pretty easily through the options. Have fun with it.</p> |
||||
<p> |
||||
Written by Jason Roy for CompareNetworks Inc. |
||||
</p> |
||||
<div class="license"> |
||||
<p> |
||||
Copyright (c) 2008 CompareNetworks Inc. |
||||
</p> |
||||
<p> |
||||
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: |
||||
</p> |
||||
<p> |
||||
The above copyright notice and this permission notice shall be included in |
||||
all copies or substantial portions of the Software. |
||||
</p> |
||||
<p> |
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
||||
THE SOFTWARE. |
||||
</p> |
||||
</div> |
||||
</div> |
||||
<div class="sideBar"> |
||||
<h3>Get jQuery.jBreadCrumb</h3> |
||||
<p> |
||||
You can download the files necessary to use the plugin here |
||||
</p> |
||||
<p> |
||||
<strong><a href="jBreadCrumb.zip" title="Download jBreadCrumb Plugin">Download jBreadCrumb Plugin</a></strong> |
||||
</p> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</body> |
||||
</html> |
After Width: | Height: | Size: 121 B |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 549 B |
@ -0,0 +1,231 @@ |
||||
/* Float Clearing |
||||
---------------------------------------------------------------------*/ |
||||
|
||||
.module:after |
||||
{ |
||||
clear: both; |
||||
content: "."; |
||||
display: block; |
||||
height: 0; |
||||
visibility: hidden; |
||||
} |
||||
|
||||
/* float clearing for IE6 */ |
||||
* html .module |
||||
{ |
||||
height: 1%; |
||||
overflow: visible; |
||||
} |
||||
|
||||
/* float clearing for IE7 */ |
||||
* + html .module |
||||
{ |
||||
min-height: 1%; |
||||
} |
||||
|
||||
|
||||
/* General Typography |
||||
---------------------------------------------------------------------*/ |
||||
html, body |
||||
{ |
||||
font-size: 12px; |
||||
line-height: 21px; |
||||
color: #444; |
||||
font-family: Arial, Helvetica, sans-serif; |
||||
font-style: normal; |
||||
font-variant: normal; |
||||
font-weight: normal; |
||||
background:#f3f3f3; |
||||
} |
||||
|
||||
html > body |
||||
{ |
||||
font-size: 12px; |
||||
line-height: 21px; |
||||
} |
||||
|
||||
|
||||
h1 |
||||
{ |
||||
font-weight: bold; |
||||
color: #007ac3; |
||||
font-size: 2em; |
||||
line-height: 1em; |
||||
margin: 1.25em 0 .75em 0; |
||||
} |
||||
|
||||
h2 |
||||
{ |
||||
color: #1371aa; |
||||
font-weight: bold; |
||||
font-size: 1.6666em; |
||||
line-height: 1em; |
||||
margin: 1.25em 0 .75em 0; |
||||
} |
||||
|
||||
h3 |
||||
{ |
||||
color: #1371aa; |
||||
font-size: 1.41667em; |
||||
line-height: 1em; |
||||
font-weight: bold; |
||||
margin: 1.25em 0 .75em 0; |
||||
} |
||||
|
||||
h4 |
||||
{ |
||||
color: #000; |
||||
font-size: 1.1667em; |
||||
line-height: 1em; |
||||
font-weight: bold; |
||||
margin: 1.25em 0 .5em 0; |
||||
} |
||||
|
||||
h5 |
||||
{ |
||||
color: #000; |
||||
font-size: 1em; |
||||
line-height: 1em; |
||||
font-weight: bold; |
||||
margin: 1.25em 0 .5em 0; |
||||
} |
||||
|
||||
h6 |
||||
{ |
||||
color: #000; |
||||
font-size: 1em; |
||||
line-height: 1em; |
||||
font-weight: bold; |
||||
margin: 1.25em 0 .5em 0; |
||||
} |
||||
|
||||
strong |
||||
{ |
||||
font-weight: bold; |
||||
} |
||||
|
||||
em |
||||
{ |
||||
font-style: italic; |
||||
line-height: 1.75em; |
||||
} |
||||
|
||||
p |
||||
{ |
||||
font-size: 1em; |
||||
line-height: 1.75em; |
||||
margin: .25em 0 1.5em; |
||||
} |
||||
td, td a, th, th a, span |
||||
{ |
||||
line-height: 1.3333em; |
||||
} |
||||
|
||||
blockquote |
||||
{ |
||||
margin: .416em 0 .416em 1.1667em; |
||||
} |
||||
|
||||
a |
||||
{ |
||||
color: #0e82c7; |
||||
text-decoration: none; |
||||
font-size: inherit; |
||||
font-weight: inherit; |
||||
} |
||||
|
||||
a:hover |
||||
{ |
||||
text-decoration: underline; |
||||
} |
||||
|
||||
ul, ol |
||||
{ |
||||
margin: .833em 0; |
||||
padding-left: 2em; |
||||
} |
||||
ul |
||||
{ |
||||
list-style-type: disc; |
||||
} |
||||
ol |
||||
{ |
||||
list-style-type: decimal; |
||||
} |
||||
ul li, ol li |
||||
{ |
||||
line-height: 1.5em; |
||||
} |
||||
|
||||
dt |
||||
{ |
||||
margin: .416em 0 0 0; |
||||
} |
||||
|
||||
dd |
||||
{ |
||||
margin: .416em 0 .416em 1.1667em; |
||||
} |
||||
|
||||
pre, code, tt |
||||
{ |
||||
font-family: "Andale Mono" , "Lucida Console" , "Courier New" , Courier, monospace; |
||||
margin: .833em 0; |
||||
} |
||||
sub |
||||
{ |
||||
vertical-align: sub; |
||||
font-size: smaller; |
||||
line-height:inherit; |
||||
} |
||||
|
||||
sup |
||||
{ |
||||
vertical-align: super; |
||||
font-size: smaller; |
||||
line-height:inherit; |
||||
} |
||||
|
||||
/* Page Specific |
||||
---------------------------------------------------------------------*/ |
||||
|
||||
#container |
||||
{ |
||||
|
||||
margin:0 auto 10px; |
||||
text-align:left; |
||||
width:1000px; |
||||
} |
||||
.breadCrumbHolder |
||||
{ |
||||
margin:0 0 20px 0; |
||||
} |
||||
pre |
||||
{ |
||||
background:#ddd; |
||||
border:solid 1px #fff; |
||||
padding:10px; |
||||
color:#111; |
||||
} |
||||
.description |
||||
{ |
||||
float:left; |
||||
width:700px; |
||||
margin-right:20px; |
||||
} |
||||
.sideBar |
||||
{ |
||||
float:left; |
||||
background:#fff; |
||||
border:solid 1px #dedede; |
||||
padding:20px; |
||||
width:238px; |
||||
margin:50px 0 0 0; |
||||
} |
||||
.license p |
||||
{ |
||||
font-size:0.83333em; |
||||
color:#888; |
||||
} |
||||
|
||||
|
@ -0,0 +1,109 @@ |
||||
/* Float Clearing |
||||
---------------------------------------------------------------------*/ |
||||
|
||||
.module:after |
||||
{ |
||||
clear: both; |
||||
content: "."; |
||||
display: block; |
||||
height: 0; |
||||
visibility: hidden; |
||||
} |
||||
|
||||
/* float clearing for IE6 */ |
||||
* html .module |
||||
{ |
||||
height: 1%; |
||||
overflow: visible; |
||||
} |
||||
|
||||
/* float clearing for IE7 */ |
||||
* + html .module |
||||
{ |
||||
min-height: 1%; |
||||
} |
||||
|
||||
/* Breadcrumb Styles |
||||
---------------------------------------------------------------------*/ |
||||
|
||||
.breadCrumb |
||||
{ |
||||
margin: 0; |
||||
padding: 0; |
||||
float: left; |
||||
display: block; |
||||
height: 21px; |
||||
overflow: hidden; |
||||
width: 990px; |
||||
padding:5px; |
||||
border:solid 1px #dedede; |
||||
background:#fff; |
||||
} |
||||
.breadCrumb ul |
||||
{ |
||||
margin: 0; |
||||
padding: 0; |
||||
height: 21px; |
||||
display: block; |
||||
} |
||||
.breadCrumb ul li |
||||
{ |
||||
display: block; |
||||
float: left; |
||||
position: relative; |
||||
height: 21px; |
||||
overflow: hidden; |
||||
line-height: 21px; |
||||
margin: 0px 6px 0px 0; |
||||
padding: 0px 10px 0px 0; |
||||
font-size: .9167em; |
||||
background: url(../Images/Chevron.gif) no-repeat 100% 0; |
||||
} |
||||
.breadCrumb ul li div.chevronOverlay |
||||
{ |
||||
position: absolute; |
||||
right: 0; |
||||
top: 0; |
||||
z-index: 2; |
||||
} |
||||
.breadCrumb ul li span |
||||
{ |
||||
display: block; |
||||
overflow: hidden; |
||||
} |
||||
.breadCrumb ul li a |
||||
{ |
||||
display: block; |
||||
position: relative; |
||||
height: 21px; |
||||
line-height: 21px; |
||||
overflow: hidden; |
||||
float: left; |
||||
} |
||||
.breadCrumb ul li.first a |
||||
{ |
||||
height: 16px !important; |
||||
text-indent:-1000em; |
||||
width:16px; |
||||
padding: 0; |
||||
margin-top: 2px; |
||||
overflow: hidden; |
||||
background:url(../Images/IconHome.gif) no-repeat 0 0; |
||||
} |
||||
.breadCrumb ul li.first a:hover |
||||
{ |
||||
background-position: 0 -16px; |
||||
} |
||||
.breadCrumb ul li.last |
||||
{ |
||||
background: none; |
||||
margin-right: 0; |
||||
padding-right: 0; |
||||
} |
||||
.chevronOverlay |
||||
{ |
||||
display: none; |
||||
background: url(../Images/ChevronOverlay.png) no-repeat 100% 0; |
||||
width: 13px; |
||||
height: 20px; |
||||
} |
@ -0,0 +1,210 @@ |
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
||||
<title>CompareNetworks jQuery'd Bread Crumb - jBreadCrumb</title> |
||||
<link rel="stylesheet" href="Styles/Base.css" type="text/css"> |
||||
<link rel="stylesheet" href="Styles/BreadCrumb.css" type="text/css"> |
||||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"> |
||||
</script> |
||||
<script src="js/jquery.easing.1.3.js" type="text/javascript" language="JavaScript"> |
||||
</script> |
||||
<script src="js/jquery.jBreadCrumb.1.1.js" type="text/javascript" language="JavaScript"> |
||||
</script> |
||||
<script type="text/javascript"> |
||||
jQuery(document).ready(function() |
||||
{ |
||||
jQuery("#breadCrumb0").jBreadCrumb(); |
||||
jQuery("#breadCrumb1").jBreadCrumb(); |
||||
jQuery("#breadCrumb2").jBreadCrumb(); |
||||
jQuery("#breadCrumb3").jBreadCrumb(); |
||||
}) |
||||
</script> |
||||
</head> |
||||
<body> |
||||
<div id="container"> |
||||
<h1>CompareNetworks jQuery'd Bread Crumb - jBreadCrumb</h1> |
||||
<!-- Bread Crumb Code - Be sure to include the chevronOverlay element so we can load the semi transparend png --> |
||||
<div class="breadCrumbHolder module"> |
||||
<div id="breadCrumb0" class="breadCrumb module"> |
||||
<ul> |
||||
<li> |
||||
<a href="#">Home</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Biocompare Home</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Product Discovery</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Life Science Products / Laboratory Supplies</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Kits and Assays</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Mutagenesis Kits</a> |
||||
</li> |
||||
<li> |
||||
Mutation Generation System™ |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
<div class="breadCrumbHolder module"> |
||||
<div id="breadCrumb1" class="breadCrumb module"> |
||||
<ul> |
||||
<li> |
||||
<a href="#">Home</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Biocompare Home</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Product Discovery</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Life Science Products / Laboratory Supplies</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Kits and Assays</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Mutagenesis Kits</a> |
||||
</li> |
||||
<li> |
||||
Mutation Generation System™ Kit (MGS™ Kit) from Finnzymes Oy |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
<div class="breadCrumbHolder module"> |
||||
<div id="breadCrumb2" class="breadCrumb module"> |
||||
<ul> |
||||
<li> |
||||
<a href="#">Home</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Biocompare Home</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Product Discovery</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Life Science Products / Laboratory Supplies</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Kits and Assays</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Mutagenesis Kits</a> |
||||
</li> |
||||
<li> |
||||
Mutation Generation System™ Kit (MGS™ Kit) from Finnzymes Oy. Ok, let's get ridiculously long here, we all know it happens. |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
<div class="breadCrumbHolder module"> |
||||
<div id="breadCrumb3" class="breadCrumb module"> |
||||
<ul> |
||||
<li> |
||||
<a href="#">Home</a> |
||||
</li> |
||||
<li> |
||||
<a href="#">Biocompare Home</a> |
||||
</li> |
||||
<li> |
||||
Mutation Generation System™ |
||||
</li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
<div class="chevronOverlay main"> |
||||
</div> |
||||
<!-- End Bread Crumb Code --> |
||||
<div class="writeup module"> |
||||
<div class="description"> |
||||
<h2>Update - jBreadCrumb 1.1</h2> |
||||
With a little help from jquery user "mikejbond", the chevron overlay div no longer needs to be part of the HTML, it is inserted dynamically. You may still want include it if you want to cache image on page load. Also, the easing plugn is no longer required, the animation will default to "swing" easing. I still recommend "easeOutQuad" for the best looking animation, but it's not necessary.<h2>Explanation</h2> |
||||
<p> |
||||
This collapsible breadcrumb was developed to deal with deeply nested, verbosely named pages. Rather than limit the amount of elements shown on the sever side, we decided to go with a client side solution for usability and SEO reasons. It also turned out nice to look at and fun to play with. |
||||
</p> |
||||
<p> |
||||
It is smart in the sense that it collapses based upon the amount and length of the elements in the set. The breadcrumb uses a semitransparent .png overlay to achieve the gradient effect seen on the elements. Visually, it helps to show a "peek" at what is underneath. |
||||
</p> |
||||
<p> |
||||
Oh, and it's compatible with ie 6, ie 7 and all standards compliant browsers. |
||||
</p> |
||||
<p> |
||||
To use the plugin, it's as simple as the code below. |
||||
</p> |
||||
<pre>jQuery(document).ready(function() |
||||
{ |
||||
jQuery("#breadCrumb").jBreadCrumb(); |
||||
})</pre> |
||||
<p> |
||||
The only additional jQuery plugin required is the <a href="http://gsgd.co.uk/sandbox/jquery/easing/" title="jQuery Easing">easing plugin</a> |
||||
written by GSGD. The plugin uses Robert Penner's wonderful easing equations that anyone from a flash background is familiar with, I love 'easeOutQuad', it makes things so smooooth. |
||||
</p> |
||||
<p> |
||||
If you don't want to use the plugin, set the options to use the normal "swing" (esentially "easeInOut") or "linear" easing provided by jQuery. The easing equations will no longer be necessary. |
||||
</p> |
||||
<pre>jQuery(document).ready(function() |
||||
{ |
||||
jQuery("#breadCrumb").jBreadCrumb({easing:'swing'}); |
||||
}) |
||||
</pre> |
||||
<p> |
||||
Or, set it globally |
||||
</p> |
||||
<pre> |
||||
jQuery.fn.jBreadCrumb.defaults.easing = 'linear'; |
||||
</pre> |
||||
<p> |
||||
There are a lot of options in there, you can adjust many of the features pretty easily through the options. Have fun with it. |
||||
</p> |
||||
<p> |
||||
Written by Jason Roy for CompareNetworks Inc. |
||||
</p> |
||||
<div class="license"> |
||||
<p> |
||||
Copyright (c) 2008 CompareNetworks Inc. |
||||
</p> |
||||
<p> |
||||
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: |
||||
</p> |
||||
<p> |
||||
The above copyright notice and this permission notice shall be included in |
||||
all copies or substantial portions of the Software. |
||||
</p> |
||||
<p> |
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
||||
THE SOFTWARE. |
||||
</p> |
||||
</div> |
||||
</div> |
||||
<div class="sideBar"> |
||||
<h3>Get jQuery.jBreadCrumb</h3> |
||||
<p> |
||||
You can download the files necessary to use the plugin here |
||||
</p> |
||||
<p> |
||||
<strong><a href="jBreadCrumb.zip" title="Download jBreadCrumb Plugin">Download jBreadCrumb Plugin</a></strong> |
||||
</p> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</body> |
||||
</html> |
@ -0,0 +1,205 @@ |
||||
/* |
||||
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
|
||||
* |
||||
* Uses the built in easing capabilities added In jQuery 1.1 |
||||
* to offer multiple easing options |
||||
* |
||||
* TERMS OF USE - jQuery Easing |
||||
*
|
||||
* Open source under the BSD License.
|
||||
*
|
||||
* Copyright © 2008 George McGinley Smith |
||||
* All rights reserved. |
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met: |
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution. |
||||
*
|
||||
* Neither the name of the author nor the names of contributors may be used to endorse
|
||||
* or promote products derived from this software without specific prior written permission. |
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE |
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* |
||||
*/ |
||||
|
||||
// t: current time, b: begInnIng value, c: change In value, d: duration
|
||||
jQuery.easing['jswing'] = jQuery.easing['swing']; |
||||
|
||||
jQuery.extend( jQuery.easing, |
||||
{ |
||||
def: 'easeOutQuad', |
||||
swing: function (x, t, b, c, d) { |
||||
//alert(jQuery.easing.default);
|
||||
return jQuery.easing[jQuery.easing.def](x, t, b, c, d); |
||||
}, |
||||
easeInQuad: function (x, t, b, c, d) { |
||||
return c*(t/=d)*t + b; |
||||
}, |
||||
easeOutQuad: function (x, t, b, c, d) { |
||||
return -c *(t/=d)*(t-2) + b; |
||||
}, |
||||
easeInOutQuad: function (x, t, b, c, d) { |
||||
if ((t/=d/2) < 1) return c/2*t*t + b; |
||||
return -c/2 * ((--t)*(t-2) - 1) + b; |
||||
}, |
||||
easeInCubic: function (x, t, b, c, d) { |
||||
return c*(t/=d)*t*t + b; |
||||
}, |
||||
easeOutCubic: function (x, t, b, c, d) { |
||||
return c*((t=t/d-1)*t*t + 1) + b; |
||||
}, |
||||