Projet

Général

Profil

Paste
Télécharger (2,58 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / adminimal_admin_menu / js / slicknav / README.md @ 651307cd

1
# SlickNav
2
## Responsive Mobile Menu jQuery Plugin
3

    
4
###[SlickNav.com](http://slicknav.com)
5

    
6
### Features
7
* Multi-level menu support
8
* Flexible, simple markup
9
* Cross-browser compatibility
10
* Keyboard Accessible
11
* Degrades gracefully without JavaScript
12
* Creates ARIA compliant menu
13

    
14
* * *
15
### Usage
16

    
17
####Include the CSS & JS
18
slicknav.css can be modified to fit website design
19

    
20
    <link rel="stylesheet" href="SlickNav/slicknav.css" />
21
	<script src="SlickNav/jquery.slicknav.min.js"></script>
22

    
23
####Menu Markup
24

    
25
    <ul id="menu">
26
        <li><a href="#">item 1</a></li>
27
        <li><a href="#">item 2</a></li>
28
    	<li><a href="#">item 3</a></li>
29
    	<li><a href="#">item 4</a></li>
30
    </ul>
31
####Initialize
32

    
33
	<script>
34
		$(function(){
35
			$('#menu').slicknav();
36
		});
37
	</script>	
38

    
39
### Options
40
	'label' : 'MENU', // Label for menu button. Use an empty string for no label.
41
	'duplicate': true, // If true, the mobile menu is a copy of the original.
42
	'duration': true, // The duration of the sliding animation.
43
	'easingOpen': 'swing', // Easing used for open animations.
44
	'easingClose': 'swing' // Easing used for close animations.
45
	'closedSymbol': '&#9658;', // Character after collapsed parents.
46
	'openedSymbol': '&#9660;', // Character after expanded parents.
47
	'prependTo': 'body', // Element, jQuery object, or jQuery selector string to prepend the mobile menu to.
48
	'parentTag': 'a', // Element type for parent menu items.
49
	'closeOnClick': false, // Close menu when a link is clicked.
50
	'allowParentLinks': false // Allow clickable links as parent elements.
51
	
52
### Callbacks
53
	'init': function(){}, // Called after SlickNav creation
54
	'open': function(trigger){}, // Called after menu or sub-menu opened. 
55
	'close': function(trigger){} // Called after menu or sub-menu closed.
56

    
57
### Methods
58
	$('.menu').slicknav('toggle'); // Method to toggle the menu
59
	$('.menu').slicknav('open'); // Method to open the menu
60
	$('.menu').slicknav('close'); // Method to close the menu
61
    
62
Without any additional configuration, both the original and mobile menus will be displayed. It is recommended to use media queries to hide the original menu and display the mobile menu when appropriate. Modernizr or similar can be used for graceful degradation.
63

    
64
For example:
65

    
66
    .slicknav_menu {
67
        display:none;
68
    }
69
    
70
    @media screen and (max-width: 40em) {
71
    	/* #menu is the original menu */
72
    	.js #menu {
73
    		display:none;
74
    	}
75
    	
76
    	.js .slicknav_menu {
77
    		display:block;
78
    	}
79
    }
80

    
81
More examples at [SlickNav.com](http://slicknav.com)
82

    
83
### Browser Support
84
* Chrome
85
* Firefox
86
* Safari
87
* Opera
88
* IE7+
89
* Android Browser
90
* iOS Safari