Robert McIntosh pro asked 7 years ago


Hey, just thought I would suggest a few updates to your waves effect plugin. One would be to wrap it in a $(document).ready(function () { }); to help prevent errors when users include this in there head tag. The other change would be to add .navbar-light and .navbar-dark as options when doing Waves.attach so that your plugin will auto detect if it should use the light or darker waves effect.
//Initialization
$(document).ready(function () {
	Waves.attach('.btn, .btn-floating', ['waves-light']);
	Waves.attach('.waves-light', ['waves-light']);
	Waves.attach('.navbar.navbar-dark .navbar-nav a:not(.navbar-brand), .navbar.navbar-dark .nav-icons li a, .navbar.navbar-dark .navbar form, .nav-tabs .nav-item', ['waves-light']);
	Waves.attach('.navbar.navbar-light .navbar-nav a:not(.navbar-brand), .navbar.navbar-light .nav-icons li a, .navbar.navbar-light .navbar form', ['waves-effect']);
	Waves.attach('.pager li a', ['waves-light']);
	Waves.attach('.pagination .page-item .page-link', ['waves-effect']);
	Waves.init(); //Preloading script
});

Adrian Sawicki free answered 7 years ago


Hi Robert, Thanks for your suggestions. We will think about them. We really appreciate ideas from users. Regards, Adrian

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: Yes
  • Provided link: No
Tags