Topic: Including MDB.js is causing ALL navbar links to get the wave effect (Urgent)

Williams pro asked 6 years ago


I am using MDB on only a part of a webpage.

To narrow the scope of MDB I prefaced all of the MDB selectors with a class (using postCSS).

However ... I am using one of your card templates that uses the "rotate" effect mandating that I  use the mdb.js file.

When I include the MDB.js file it is assigning the wave-light effect to EVERY navbar on the webpage, whether I want it or not.

How can I narrow its scope?

-Ken Williams

PS I am a paid Pro user


Williams pro commented 6 years ago

PS I worked around this temporarily by patching the following code in mdb.js: (You'll see I added our class to the front of each of the selectors) //Initialization Waves.attach('.tsMdb .btn:not(.btn-flat), .tsMdb .btn-floating', ['waves-light']); Waves.attach('.tsMdb .btn-flat', ['waves-effect']); Waves.attach('.tsMdb .chip', ['waves-effect']); Waves.attach('.tsMdb .view a .mask', ['waves-light']); Waves.attach('.tsMdb .waves-light', ['waves-light']); Waves.attach('.tsMdb .navbar-nav a:not(.navbar-brand), .tsMdb .nav-icons li a, .tsMdb .nav-tabs .nav-item:not(.dropdown)', ['waves-light']); Waves.attach('.tsMdb .pager li a', ['waves-light']); Waves.attach('.tsMdb .pagination .page-item .page-link', ['waves-effect']);

Mikołaj Smoleński staff answered 6 years ago


Hi Williams, We've added waves effect as default to navbars. Your solution is the best to solve Your issue. Regards

Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags