Add Foundation definitions and tests

This commit is contained in:
Boris Yankov
2012-11-19 03:03:40 +02:00
parent 7a211c6619
commit 5c238d9fce
3 changed files with 99 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ Complete
* [ember.js](http://emberjs.com/) (by [Boris Yankov](https://github.com/borisyankov))
* [Express](http://expressjs.com/) (by [Boris Yankov](https://github.com/borisyankov))
* [Fancybox](http://fancybox.net/) (by [Boris Yankov](https://github.com/borisyankov))
* [Foundation](http://foundation.zurb.com/) (by [Boris Yankov](https://github.com/borisyankov))
* [GoogleMaps](https://developers.google.com/maps/) (by [Esben Nepper](https://github.com/eNepper))
* [Handlebars](http://handlebarsjs.com/) (by [Boris Yankov](https://github.com/borisyankov))
* [History.js](https://github.com/balupton/History.js/) (by [Boris Yankov](https://github.com/borisyankov))

65
foundation/foundation-3.2.d.ts vendored Normal file
View File

@@ -0,0 +1,65 @@
// Type definitions for Foundation 3.2
// Project: http://foundation.zurb.com/
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery-1.8.d.ts"/>
interface OrbitOptions {
animation?: string;
animationSpeed?: number;
timer?: bool;
resetTimerOnClick?: bool;
advanceSpeed?: number;
pauseOnHover?: bool;
startClockOnMouseOut?: bool;
startClockOnMouseOutAfter?: number;
directionalNav?: number;
captions?: number;
captionAnimation?: string;
captionAnimationSpeed?: number;
bullets?: bool;
bulletThumbs?: bool;
bulletThumbLocation?: string;
afterSlideChange?: () => void;
fluid?: bool;
}
interface RevealOptions {
animation?: string;
animationSpeed?: number;
closeOnBackgroundClick?: bool;
dismissModalClass?: string;
open?: () => void;
opened?: () => void;
close?: () => void;
closed?: () => void;
}
interface JoyrideOptions {
tipLocation?: string;
nubPosition?: string;
scrollSpeed?: number;
timer?: number;
startTimerOnClick?: bool;
nextButton?: bool;
tipAnimation?: string;
pauseAfter?: number[];
tipAnimationFadeSpeed?: number;
cookieMonster?: bool;
cookieName?: string;
cookieDomain?: bool;
tipContainer?: string;
postRideCallback?: () => void;
postStepCallback?: () => void;
}
interface JQuery {
orbit(): JQuery;
orbit(OrbitOptions): JQuery;
reveal(): JQuery;
reveal(RevealOptions): JQuery;
joyride(): JQuery;
joyride(JoyrideOptions): JQuery;
}

View File

@@ -0,0 +1,33 @@
/// <reference path="../jquery/jquery-1.8.d.ts" />
/// <reference path="foundation-3.2.d.ts" />
function test_orbit() {
$("#featured").orbit();
$('#featured').orbit({
animation: 'fade',
animationSpeed: 800,
timer: true,
resetTimerOnClick: false,
advanceSpeed: 4000,
pauseOnHover: false,
startClockOnMouseOut: false,
startClockOnMouseOutAfter: 1000,
directionalNav: true,
captions: true,
captionAnimation: 'fade',
captionAnimationSpeed: 800,
bullets: false,
bulletThumbs: false,
bulletThumbLocation: '',
afterSlideChange: function () { },
fluid: true
});
}
function test_fluid() {
$("#myModal").reveal();
}
function test_joyride() {
$("#chooseID").joyride();
}