Skip to content

Instantly share code, notes, and snippets.

@vaibhav93
Created November 8, 2015 08:21
Show Gist options
  • Select an option

  • Save vaibhav93/5392df026c635af94b03 to your computer and use it in GitHub Desktop.

Select an option

Save vaibhav93/5392df026c635af94b03 to your computer and use it in GitHub Desktop.
require(['jquery', 'Materialize'], function ($) {
console.log($);
$(document).ready(function () {
$('.show-search').click(function () {
$('.search-out').fadeToggle("50", "linear");
});
//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: false, // Activate on click
alignment: 'left', // Aligns dropdown to left or right edge (works with constrain_width)
gutter: 0, // Spacing from edge
belowOrigin: false // 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