Upon loading the Bootstrap 4 CSS, the collapse of the side bar navigation results in a blank screen

Having trouble implementing a side navigation bar with collapse functionality. I've included jquery 3.4.1 and CSS, but adding Bootstrap 4 css and Bootstrap js causes the page to turn into a white screen with no errors in the console. After removing Bootstrap, everything works fine, but Bootstrap is essential for my project. Below are the JS, CSS, and JSP code snippets for reference. Any help would be greatly appreciated.

$(document).ready(function(){
$(".hamburger").click(function(){
  $(".wrapper").toggleClass("collapse");

});
});
@import url('https://fonts.googleapis.com/css?family=Montserrat:400,600,700&display=swap');

*{
  margin: 0;
  padding: 0;
  list-style: none;
  text-decoration: none;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
}
body{
  background: #e1ecf2;
}

<!-- More CSS code here -->

</code></pre>
<pre><code><!DOCTYPE html>
<html lang="en">
<head>

<!-- Head section here -->

</head>
<body>

<!-- Main HTML structure here -->

</body>
</html>

The issue arises when adding the following line:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
 integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

I have tested without the bootstrap CSS and it works fine, but the bootstrap CSS is necessary for the project.

Answer №1

Make sure to organize your scripts in the correct order and remember to include any necessary rules in your CSS that may override default Bootstrap styles

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="../css/dataTables.min.css">
<script type="text/javascript" src="../Scripts/dataTables.min.js"></script>
<link rel="stylesheet" href="../css/Side.css">
<script src="../Scripts/fontawsome.js"></script>

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

Searching for a specific set of rows within an array? Look no further than jQuery and JavaScript

I'm struggling to find the right title for my project, but I'm doing my best to capture its essence. I am in the process of developing a calculator that compares values within multiple arrays. Each data item in my array consists of 34 rows, wit ...

Hide and show submenus with jQuery while ensuring that the initial submenu remains visible, along with the main menu

I am struggling to figure out how to make the first message active by default along with its corresponding menu selection in my navbar. I have implemented a show/hide functionality on the main menu click, but currently only the menu is being set as active ...

What is the process for obtaining a client-side cookie using next.js?

I'm currently facing an issue where I can't seem to maintain a constant value for the isAuthenticated variable between server-side and client-side in next.js. In my setup, I am using a custom app.js file to wrap the app with Apollo Provider. The ...

Guide on integrating next-images with rewrite in next.config.js

I'm currently facing a dilemma with my next.config.js file. I've successfully added a proxy to my requests using rewrite, but now I want to incorporate next-images to load svg files as well. However, I'm unsure of how to combine both functio ...

Crafting web design with CSS and HTML programming

I am currently working on implementing a sublevel drop-down menu. While I have successfully created the first level of the menu, the second level always displays prominently when hovering over the first drop-down menu. My goal is to only show the second le ...

Material UI defaults remain unchanged despite any emotional influence

I'm currently experimenting with custom styling on a MaterialUI Typography component using the code snippet below: const StyledTitleTypography = styled(Typography)` color: 'black'; font-weight: 'bold'; `; <StyledTitleTypogr ...

How can I dynamically assign a variable to the ID of a <div> element in a Django template?

Discovering the world of Django template language has been quite an interesting journey for me, especially as I experiment with bootstrap collapses to showcase my items. Let's take a look at the code snippet below: {% for item in items %} <div id=& ...

displaying variables in tooltips along with their translations

Could you please assist me with this tooltip issue? It seems to be malfunctioning. <div class="btn-edit-nounderline" matTooltipClass="custom-tooltip" (click)="edit(row.widgetAccess)" title="{{getTitle(row.widgetAccess ...

What causes the variable "change" to display unexpected results?

Why isn't the function working as expected? I need the change to be 0. I believe there must be a more efficient way to solve this issue, but what's bothering me is that the "change" variable is giving strange values...need help! function checkCa ...

Error: The property 'length' of the undefined cannot be read

I am currently working on developing a node.js application and integrating a scheduler app into it. I found a helpful guide that I am following: However, when I try to access the /data page, I encounter an error message stating "cannot read property &apos ...

Engaging User Forms for Enhanced Interactivity

I'm in the process of developing an application that involves filling out multiple forms in a sequential chain. Do you have any suggestions for creating a more efficient wizard or form system, aside from using bootstrap modals like I currently am? C ...

Is there a way to activate jQuery by simply clicking on a link?

I am trying to implement a method for dynamically loading a new set of HTML using jQuery. Can someone help me figure out how to bind this functionality to a click event? Here is the jQuery snippet I have: $("body.page-ready").load("photo.html .test> * ...

What is the best way to maintain the same height for a textarea and input fields?

What is the best way to align the message input field with the name and phone input fields? I need the height of the message input field to match the combined height of the three inputs on the left. It's crucial that the borders line up perfectly. I ...

Node server quickly sends a response to an asynchronous client request

Apologies for my lack of writing skills when I first wake up, let me make some revisions. I am utilizing expressjs with passportjs (local strategy) to handle my server and connect-busboy for file uploads. I believe passport will not have a role in this pr ...

ShadowCamera is absent in Three.js

I'm currently exploring the world of Three.js and experimenting with this demo code: function init(){ var scene = new THREE.Scene(); var camera = new THREE.PerspectiveCamera(45, window.innerWidth/window.innerHeight, .1, 500); var renderer = new ...

Navigational menu header leads to specific location on the page

I need the dropdown menu header to both open the related menu and display the content of the first element of the submenu, which is an anchor link on the page. Here is the HTML code for the Dropdown Menu: <div class="collapse navbar-collapse" id="myNa ...

Calculate the size of an array after applying a filter operation

I have created an if statement that filters the array based on user input, acting as a search bar for the array. var filter = userInput.value.toUpperCase(); for (var i = 0; i < myArrayElements.length; i++) { if (myArrayElements.toUpperCase().indexO ...

Semantic UI Footer allows you to easily create a stylish

Greetings! I'm new to the semantic-ui framework and I'm encountering an issue with the footer. My goal is to have the footer always stay at the bottom of the page without being fixed. Here's a snippet of my simple HTML code: <!DOCTYPE h ...

The Highchart data series seems to be getting cut off

Can anyone assist me in creating a 24-hour data chart using Highcharts? I am encountering an issue where the first two data points are not rendering correctly, showing 11 columns instead of 12. I have provided an example here. Any help would be greatly a ...

The for...of loop cannot be used with the .for property since it is not iterable. (Is

let arr = [{ category: 'music', views: 20 }, { category: 'abc', views: 32 }, { category: 'bob', views: 20 } ] for (const [key, value] of arr) { console.log(key, value) } console.log(Array ...