Skip to content

Instantly share code, notes, and snippets.

@vaibhav93
Created November 8, 2015 15:31
Show Gist options
  • Select an option

  • Save vaibhav93/5f16b815b70051dc7bba to your computer and use it in GitHub Desktop.

Select an option

Save vaibhav93/5f16b815b70051dc7bba to your computer and use it in GitHub Desktop.
define(['jquery', 'Materialize'], function ($, Materialize) {
$(document).ready(function () {
//console.log(Waves);
$('.show-search').click(function () {
$('.search-out').fadeToggle("50", "linear");
});
//init waves
Waves.displayEffect();
//user dropdown button
$('.dropdown-button').dropdown({
inDuration: 300,
outDuration: 225,
constrain_width: false, // Does not change width of dropdown to that of the activator
hover: true, // Activate on click
alignment: 'left', // Aligns dropdown to left or right edge (works with constrain_width)
gutter: 0, // Spacing from edge
belowOrigin: true // Displays dropdown below the button
})
//sidebar
$('.button-collapse').sideNav({
menuWidth: 240, // Default is 240
edge: 'left', // Choose the horizontal origin
closeOnClick: false
});
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment