Topic: Sample Gallery Code Not working as expected

Fields Marshall free asked 5 years ago


Expected behavior

https://mdbootstrap.com/plugins/jquery/gallery/#carousel-2 is not working as expected

Actual behavior

javascript errors mdb.min.js:1 Uncaught TypeError: Cannot read property 'firstChild' of undefined at Object.getChildByClass (mdb.min.js:1) at Object.init (mdb.min.js:1) at i (mdb.min.js:1) at HTMLDivElement.e (mdb.min.js:1)

Resources (screenshots, code snippets etc.)

https://mdbootstrap.com/snippets/jquery/fields_marshall/618613


Fields Marshall free answered 5 years ago


Ahh ok .. Thanks now I understand



On your snippet simply change your javascript section to look like this:

// MDB Lightbox Init
$(function () {
  $("#mdb-lightbox-ui").load("/wp-content/themes/mdbootstrap4/mdb-addons/mdb-lightbox-ui.html");
});


Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.7.6
  • Device: Desktop
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes