PJCHENder 未整理筆記

[CSS] Foundation JavaScript Utilities

2017-10-03

@(CSS)[foundation]

[CSS] Foundation JavaScript Utilities

keywords: foundation, css, javascript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
* Box
**/
Foundation.Box.GetDimensions(element);
Foundation.Box.ImNotTouchingYou(element [, parent, leftAndRightOnly, topAndBottomOnly]);


/**
* Keyboard
**/
Foundation.Keyboard.findFocusable($('#content'));
Foundation.Keyboard.trapFocus($('#content'));
Foundation.Keyboard.releaseFocus($('#content'));

/**
* MediaQuery
**/

Foundation.MediaQuery.get('medium');
Foundation.MediaQuery.atLeast('large');
Foundation.MediaQuery.queries;
Foundation.MediaQuery.current;

$(window).on('changed.zf.mediaquery', function(event, newSize, oldSize){});

/**
* Timer: includes: timer.start(), timer.pause(), timer.restart()
**/
var timer = new Foundation.Timer($element, {duration: ms, infinite: bool}, callback);


/**
* ImageLoader
**/
Foundation.onImagesLoaded($images, callback);

/**
* Touch
**/
$('selector').addTouch().on('mousemove', handleDrag);
$('selector').spotSwipe().on('swipeleft', handleLeftSwipe);

參考資料

掃描二維條碼,分享此文章