This time I will share jQuery Plugin and tutorial about Customizable Gooey Menu Plugin With jQuery And SVG Filters – gooey.js, hope it will help you in programming stack.
gooey.js is a jQuery plugin that enables you to create highly customizable popout menus with fancy gooey effects using CSS3 and SVG filters.
How to use it:
1. Inside the page’s head section include the jQuery gooey.js plugin’s CSS file.
1 |
< link rel = "stylesheet" href = "gooey.min.css" > |
2. Create the gooey menu with a hamburger toggle in the webpage.
03 |
< input type = "checkbox" class = "menu-open" name = "menu-open" id = "menu-open" > |
04 |
< label class = "open-button" for = "menu-open1" > |
05 |
< span class = "burger burger-1" ></ span > |
06 |
< span class = "burger burger-2" ></ span > |
07 |
< span class = "burger burger-3" ></ span > |
11 |
< a href = "#" class = "gooey-menu-item" > Menu 2 </ a > |
12 |
< a href = "#" class = "gooey-menu-item" > Menu 3 </ a > |
13 |
< a href = "#" class = "gooey-menu-item" > Menu 4 </ a > |
14 |
< a href = "#" class = "gooey-menu-item" > Menu 5 </ a > |
15 |
< a href = "#" class = "gooey-menu-item" > Menu 6 </ a > |
3. Put jQuery library and jQuery gooey.js plugin’s JavaScript files at the bottom of the webpage.
1 |
< script src = "jquery.min.js" ></ script > |
2 |
< script src = "gooey.min.js" ></ script > |
4. Call the function on the nav
to active the gooey menu.
1 |
$( "#gooey-demo" ).gooeymenu({ |
5. All default configuration options.
01 |
$( "#gooey-demo" ).gooeymenu({ |
08 |
contentColor: "white" , |
11 |
bounceLength: "medium" , |
17 |
menuItemPosition: "glue" |
20 |
menuItemPosition: "spaced" , |
6. Use the following event API to hook into animation “open” and “close” events. In this example, we change menu item colors when menu “open” and “close” events are triggered.
01 |
$( "#gooey-demo" ).gooeymenu({ |
04 |
$( this ).find( ".gooey-menu-item" ).css( "background-color" , "steelblue" ); |
05 |
$( this ).find( ".open-button" ).css( "background-color" , "steelblue" ); |
07 |
close: function (gooey) { |
08 |
$( this ).find( ".gooey-menu-item" ).css( "background-color" , "#00ffff" ); |
09 |
$( this ).find( ".open-button" ).css( "background-color" , "#00ffff" ); |
This awesome jQuery plugin is developed by dominicdomu. For more Advanced Usages, please check the demo page or visit the official website.