Found 8591 Articles for Front End Technology

How to add bootstrap toggle-switch using JavaScript?

Aayush Mohan Sinha
Updated on 10-Apr-2023 14:45:38

1K+ Views

The Bootstrap library provides a number of features to the user to make their coding experience smooth. One of such features which the user can choose from is the toggle-switch. The toggle-switch, one of its useful features, provides users the ability to add components which can switch between two states such as on and off. Bootstrap Toggle-switch The Cascading Style Sheets (CSS) framework Bootstrap is a toolkit that makes it simpler and more standards-compliant to create websites. It can be used, alongside JavaScript, to create a responsive user interface. The simple Bootstrap toggle-switch component is used to select one of ... Read More

How to add badge to list group in Bootstrap?

Aayush Mohan Sinha
Updated on 10-Apr-2023 17:32:36

294 Views

Adding badges to list groups in Bootstrap is a crucial aspect of creating engaging and informative user interfaces. Badges provide developers with the ability to display important information such as notification counts, unread messages, or upcoming events alongside list group items, allowing users to quickly and easily identify relevant content. While adding badges to list groups in Bootstrap may seem like a daunting task, the process can be easily accomplished with the proper guidance. In this article, we will explore the step-by-step approach to adding badges to list groups in Bootstrap, highlighting the underlying syntax and customization options available within ... Read More

How to add and remove input fields dynamically using jQuery with Bootstrap?

Aayush Mohan Sinha
Updated on 10-Apr-2023 14:16:31

3K+ Views

In proportion to the development of intricate and user-focused web applications, the capability to append and discard input fields dynamically has gained vital importance for developers. By amalgamating the influential abilities of jQuery and Bootstrap, developers can create responsive user interfaces that acknowledge user input instantly. The course of action for adding and removing input fields dynamically by means of jQuery and Bootstrap might seem daunting; however, with a profound comprehension of the inherent syntax and parameters, it can be executed with effortless ease. This paper delves into a step-by-step approach to adding and removing input fields dynamically with the ... Read More

How to add and remove CSS classes to an element using jQuery?

Aayush Mohan Sinha
Updated on 10-Apr-2023 14:42:24

2K+ Views

CSS classes perform a pivotal function in designing web pages and have a significant influence on their comprehensive facade. Since more significance is being placed on the aesthetics of pages, customizing web pages dynamically can greatly boost their value. At first observation, this task might appear to be intimidating, but utilizing jQuery, it becomes effortless to append or extract CSS classes from an HTML component in real-time, thereby providing an expeditious and effortless method of producing interactive and dynamic web pages. By affixing or eliminating CSS classes, we can reform the presentation of components on the spot, predicated on user ... Read More

JavaScript Program for Find the smallest missing number

Saurabh Anand
Updated on 10-Apr-2023 13:56:51

377 Views

We are given a sorted array of distinct non-negative integers, here we have to find the smallest missing number. Hence in this tutorial, we will explore different methods to solve this problem and discuss their time complexities with various examples. Understanding the Problem The problem statement is quite simple. Given a sorted array of distinct non-negative integers, we need to find the smallest missing number in it. Let's take an example to understand the problem. Example Let’s say that we have an array [1, 2, 4, 5, 6]. Here, We can see that there is a space between the ... Read More

JavaScript Program to Find the Lost Element from a Duplicated Array

Ravi Ranjan
Updated on 06-Jun-2025 12:25:24

1K+ Views

To find the lost element from a duplicated array in JavaScript, we will be discussing various approaches.Prerequisite to solve this problem requires an understanding of JavaScript arrays, loops, set object and binary search. In this article we are having two arrays where one array is duplicate of other with a missing element, our task is to find the lost element from a duplicated array in JavaScript. Example Input: array1 = [1, 2, 3, 4, 5, 6] array2 = [1, 2, 3, 5, 6] Output: Missing element: 4 Approaches to Find the Lost Element Here ... Read More

JavaScript Program to Find k Pairs with Smallest Sums in Two Arrays

Saurabh Anand
Updated on 04-Dec-2024 16:40:53

330 Views

To find k pairs with smallest sums in two arrays in Javascript, we will be using sorted arrays in ascending order. We are going to discuss two different approaches with stepwise explanation and examples. In this article we are having two arrays and a value of k, our task is to find k pairs with smallest sums in two arrays. Users must be familiar with JavaScript arrays, loops and conditional statement. Example Input: arr1 = [1, 7, 11], arr2 = [2, 4, 6] k = 3 Output: [[1, 2], [1, 4], [1, 6]] Input: arr1 = [1, 4, ... Read More

JavaScript Program for Equilibrium Index of an Array

Saurabh Anand
Updated on 07-Apr-2025 14:22:46

787 Views

To write a JavaScript program for equilibrium index of an array, we are going to discuss three different approaches with detailed explanation and example codes. The equilibrium index of an array is the position where the sum of the elements to its left and right equals one another. In this article we are having an array of integers, our task is to to write a JavaScript program for equilibrium index of an array. Example Input: arr = [-7, 1, 5, 2, -4, 3, 0] Output: Equilibrium index: 3 At index 3, left sum = -7 + ... Read More

JavaScript Program for Diagonally Dominant Matrix

Ravi Ranjan
Updated on 06-Jun-2025 19:11:07

241 Views

Diagonally dominant matrix refers to square matrix having magnitude of diagonal element in a row greater than or equal to the sum of magnitude of non-diagonal elements in that row. In this article we are having a square matrix, our task is to write JavaScript program for diagonally dominant matrix. Users must be familiar with 2D matrix, nested for loop and conditional statement. Formula: $$\mathrm{|\:a_{ii}\:|\:\geq\:\displaystyle\sum\limits_{j ≠ i}\:|\:a_{ij}|}$$ for all i Where aij denotes the entry in the ith row and jth column Example Input: [A] = ... Read More

Image Classification using JavaScript

Shubham Vora
Updated on 07-Apr-2023 09:45:22

1K+ Views

The meaning of image classification is to extract as much information from the image as possible. For example, when you upload an image to Google photos, it extracts information from the image and suggests the location based on that. We can use OpenCV to detect every small information from the image and predict the image. Training and testing models from scratch using JavaScript requires lots of effort, and also, it requires the proper dataset containing the different images. So, in this tutorial, we will use the pre-trained model of ml5.js to classify the image. The ml5.js library contains various pre-trained ... Read More

Advertisements