Topic: TypeError: t is undefined
anandbohra pro asked 7 years ago
mitaamara free answered 3 years ago
I have same error when click button for collapse dropdown
this is my code
Krzysztof Wilk staff commented 3 years ago
Hi!
Which technology do you use with our MDB package? Did you check the solutions above? If they didn't help - could you create a snippet with your problem without the involvement of another framework?
Best regards
Tenarius free answered 4 years ago
I have the same Error. TypeError: t is undefined
, when i click of one of the gallery-photos.Here is my code:
<!doctype html>
<html>
<head>
<title>Hello World</title>
<link href="./../resources/mdbpro/css/bootstrap.min.css" rel="stylesheet">
<link href="./../resources/mdbpro/css/mdb.min.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-12">
<div id="mdb-lightbox-ui"></div>
<div class="mdb-lightbox">
<figure class="col-md-4">
<a href="https://mdbootstrap.com/img/Photos/Lightbox/Original/img%20(145).jpg" data-size="1600x1067">
<img alt="picture" src="https://mdbootstrap.com/img/Photos/Lightbox/Thumbnail/img%20(145).jpg" class="img-fluid">
</a>
</figure>
<figure class="col-md-4">
<a href="https://mdbootstrap.com/img/Photos/Lightbox/Original/img%20(150).jpg" data-size="1600x1067">
<img alt="picture" src="https://mdbootstrap.com/img/Photos/Lightbox/Thumbnail/img%20(150).jpg" class="img-fluid" />
</a>
</figure>
<figure class="col-md-4">
<a href="https://mdbootstrap.com/img/Photos/Lightbox/Original/img%20(152).jpg" data-size="1600x1067">
<img alt="picture" src="https://mdbootstrap.com/img/Photos/Lightbox/Thumbnail/img%20(152).jpg" class="img-fluid" />
</a>
</figure>
</div>
</div>
</div>
</div>
<script src="./../resources/mdbpro/js/jquery.min.js" ></script>
<script src="./../resources/mdbpro/js/popper.min.js" ></script>
<script src="./../resources/mdbpro/js/bootstrap.min.js" ></script>
<script src="./../resources/mdbpro/js/mdb.js" ></script>
<script>
$(function () {
$("#mdb-lightbox-ui").load("./../resources/mdbpro/mdb-addons/mdb-lightbox-ui.html");
});
</script>
</body>
</html>
Solution
I have simplified my example above. In my original code I linked $("#mdb-lightbox-ui").load("./../resources/mdbpro/mdb-addons/mdb-lightbox-ui.html");
via script call. The problem was that I entered the wrong path there. So it is correct, as shown in my example $("#mdb-lightbox-ui").load("./../resources/mdbpro/mdb-addons/mdb-lightbox-ui.html");
.
Grzegorz Bujański staff commented 4 years ago
Hi. I created the project using your code and I have no error in the console. Which MDB version are you using?
Tenarius free commented 4 years ago
Thanks for looking at this. I have the solution. In this example, I simplified my code for demonstration purposes and basically solved the problem. The problem was $("#mdb-lightbox-ui").load("./../resources/mdbpro/mdb-addons/mdb-lightbox-ui.html");
. In my example, I adjusted the path correctly. I even edited that in my post afterwards. In my original code I had linked this part with <script src ="./../resources/js/scripts/scripts.js"></script>
and there for mdb-lightbox-ui.htm
wrong path specified. Unfortunately there was no more precise error message. Disgusting mistake. Thanks for the second opinion and the food for thought. <3
Grzegorz Bujański staff commented 4 years ago
You're welcome. I'm glad you solved this problem and everything works.
herfelp free answered 5 years ago
Hi im getting this error on MDB jquery lightbox TypeError: t is undefined. Please help me. Thank you
MDBootstrap staff commented 5 years ago
Hi herfelp, Can you create a snippet with your code example so I can examine what causes this error?
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No
Bartłomiej Malanowski staff commented 7 years ago
Could you please share your code with us?anandbohra pro commented 7 years ago
a simple html page <select class="mdb-select" data-val="true" data-val-number="The field Party must be a number." data-val-required="Party ID is must" id="PartyID" multiple="multiple" name="PartyID"><option value="11">SHOPPERS STOP LTD - THANE (153)</option> </select> TypeError: t is undefined[Learn More] popper.min.js:1:18912Mirosław Stasiak free commented 7 years ago
Send me your all code here on email m.stasiak@mdbootstrap.com