The baguetteBox.js malfunctioning issue is causing the controls to appear at the bottom of the page

I have integrated baguetteBox.js into a website with two separate pages:

  • homepage
  • gallery

On the gallery page, everything is working perfectly fine. However, on the homepage, I am facing an issue where the lightbox controls (e.g., id="baguetteBox-overlay") are unexpectedly appearing at the bottom of the webpage as shown below:

Both pages use the same assets and there are no errors showing in the console.

You can view the issue live at:

  • homepage: <- displaying the problem
  • gallery:

Version being used: _baguettebox.js/1.10.0 (with Bootstrap 4)

Any suggestions on how to resolve this issue would be greatly appreciated?

Relevant code:

Homepage code snippet:

<section class="gallery-block compact-gallery">
    <div class="container">
        <div class="row no-gutters">

            <div class="col-md-6 col-lg-4 item zoom-on-hover">
                <a class="lightbox" href="/media/images/image5.width-1400.jpg">
                    <img class="img-fluid image" src="/media/images/image5.width-1400.jpg">
                    <span class="description">
                        <span class="description-heading">Image 5</span>
                    </span>
                </a>
            </div>

            <div class="col-md-6 col-lg-4 item zoom-on-hover">
                <a class="lightbox" href="/media/images/image1.width-1400.jpg">
                    <img class="img-fluid image" src="/media/images/image1.width-1400.jpg">
                    <span class="description">
                        <span class="description-heading">Image 1</span>
                    </span>
                </a>
            </div>
            ....

    </div>
    </div>
</section>

Loading JavaScript at the bottom of the page:

<script src="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.10.0/baguetteBox.min.js"></script>
<script>
 baguetteBox.run('.compact-gallery', {
     animation: 'slideIn',
 });
</script>

Answer №1

Due to the absence of the base stylesheet, the dialog box was displaying incorrectly. This issue can be resolved by including the correct style sheet:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/baguettebox.js/1.10.0/baguetteBox.min.css" />
.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the most effective method for building this item?

Looking to create an object, let's call it "car": function car(name, speed, options){ this.name = name; this.speed = speed; this.options = options; } When it comes to the "options", I thought of using an array: var carMustang = new car("Musta ...

Strategies for implementing recursive component calling while maintaining nested level monitoring in React Native

Within my application, I have two key components: CommentList and Comment. The CommentList component is responsible for rendering comments by calling the Comment component through a map function, which loops ten times. A unique feature of my app is that e ...

Combining for loops and async waterfall for optimal efficiency

Hey there, I'm just starting out with Nodejs and could really use some advice on writing more efficient code. Let me explain my issue. So, I have this function that is utilizing an async waterfall model. My goal is to call this function within a loop ...

A password verification tool is indicating that the combination (0,0,0) can unlock, however, the given password does not

import React ,{useState}from 'react'; import './App.css'; function App() { const password =[2,2,3]; const [digits ,setDigits]=useState[0,0,0]); const [isUnlocked,setIsUnlocked]=useState(false); let setDigitAtIndex=(digit,idx ...

With TypeScript, you have the flexibility to specify any data type in the generic types when using the axios.get method

axios.get('/api') When working with TypeScript as shown above, it is important to designate types for better clarity. This allows us to reference the type definition of axios, like so: (method) AxiosInstance.get<any, AxiosResponse<any> ...

Authenticate Google OAuth with a custom backend using a unique access token and refresh token

I have a NestJS backend that exposes the following API: @Post('sign-in-with-google-account') async signInWithGoogleAccount( @Body body: { idToken: string }, @Res({ passthrough: true }) response: Response ) { const user = ...

Click on a row to be redirected to a webpage with a dynamic parameter included in the URL

In my Jade template, I have a row that looks like this: tr(data-href="http://localhost:3000/patient/" + patients[0].patient[g]["number"]).clickable-row. When rendered in the HTML console, it outputs as: <tr class="clickable-row" data-href="http://local ...

Launching a Node.js script with pm2 and implementing a delay

Utilizing the amazing pm2 package to maintain the longevity of my node.js applications has been extremely helpful. However, I have encountered a problem that I am unsure how to resolve. One of my applications involves multiple scripts, a server, and sever ...

Is it possible for a beginner like me in Node.js to incorporate external npm packages into Express.js and React.js?

Recently, I embarked on a journey to learn Node.js for backend development. In the past month or so, I have familiarized myself with various concepts such as npm, Express.js, Mongoose, and MongoDB for database management. During my npm exploration, I dis ...

Guide to updating the object value within an array in React

Is there a way to toggle the value of a specific object key called "clicked" to true using the spread operator in React? I want to be able to press a button and update the object's value. let questions = [ { title: "What do I want to learn ...

Is there a way to detect when a user has recently updated their Chrome Extension in order to send them notifications?

I have implemented an info button in my extension, where a red dot appears on the top right corner to alert users of new updates whenever they update the extension. Currently, I achieve this by storing a row in localStorage when users view the updates. If ...

Is it possible to access the DOM element within which the registerHelper is being used?

My current challenge involves using Template.registerHelper to create a helper that can output either class1 or class2 based on a boolean value. Additionally, I want the output to include an initial class only if it's the first time the helper is call ...

Unable to retrieve parameters upon passing navigate

Having two navigators set up, one named Auth which is a StackNavigator containing the SignInScreen, and another called App which is a BottomTabNavigator with the HomeScreen. I am trying to navigate from the HomeScreen to the SignInScreen while passing some ...

What is the best way to forward a file upload request from a Next.js API to another API?

Trying to crop an image within a Next.js application, then sending it through an API route within the app before reaching an external API endpoint is proving to be a challenge. The process works fine without going through the API route, but once that step ...

Exploring the capabilities of qTip2 integrated with jQuery Vector Maps (jqvmap)

Is there a way to disable the default tooltip in jqvmap and replace it with qTip2? Check out this example. Here's the jQuery code: jQuery('#vmap').vectorMap({ map: 'world_en', backgroundColor: null, color: '#ffff ...

Combining arrays to create a single object: A step-by-step guide

Here is the current output I have, which contains multiple arrays: ["{"486|575":2,"484|568":4}", "{"486|575":2,"484|568":4}", "{"481|570":1,"482|564":1}"] My goal is to combine these arrays into an object with the following output using JavaScript/jQuery ...

Manipulating datetime format within an input element of type date using Angular's ngModel

I have a date input in my form that is populated from the controller with a string value for 'dateOfDiagnosis'. The format of this string includes the time as well, like this: "2010-09-08T00:00:00" To bind this value to an input field in Angu ...

Looking for a foolproof method to determine if a string contains any of the elements in a given array of substrings? And if found, how

I am currently faced with the task of decoding multiple URLs, specifically focusing on encoded special characters like "+", "|", and more. My approach involves having a collection of encoded characters that I need to locate in the URL string. What is the ...

THREE.js: dual scenes sharing identical camera positions

I'm currently working on a project where I have two overlapping scenes. The top scene can be faded in and out using a slider, and users can rotate objects within the scene for a better view. My challenge is to keep the camera position consistent betw ...

Exploring a Vue side menu drawer concept within Nuxt - what's the next move?

I've managed to emit the toggle event in the console, as shown below, but I'm unsure of what to do next. How can I make my event display a division? Currently, I am only able to show it using v-if="toggle=true", however, it doesn't ...