Found 8895 Articles for Front End Technology

How To Show Only One V-Menu At A Time When Clicking To Show The Menu?

Yaswanth Varma
Updated on 21-Apr-2023 15:50:05

801 Views

The task we are going to perform in this article was how to show only one v-menu at a time when clicking to show the menu, let’s dive into the article for getting better understanding on v-menu. A customized version of NativeUI was used to create the server-side trainer and menu known as vMenu. It features complete permissions support, allowing the server owner to control who can do what. Displaying v-menu A user interface's menu is a flexible element. It displays a popover with a variety of uses, like presenting a menu of choices. They may be used in conjunction ... Read More

How To Add An HTML Element Starting After One And Finishing Before Another One?

Yaswanth Varma
Updated on 21-Apr-2023 15:47:38

105 Views

This article shows how to add an HTML element in between two existing elements. This is a common task when creating webpages, and can be achieved with a few simple steps. We will be using the JavaScript API to access and manipulate the elements on our webpage. The task we are going to perform in this article is adding an HTML element, starting after one and finishing before another one. For this, we are going to use insertBefore() method. Using insertBefore() method The Node interface's insertBefore() method places a node as a child of a given parent node ahead of ... Read More

How to Make Scrollbar Custom Arrows Work on Mobile Devices?

Yaswanth Varma
Updated on 20-Apr-2023 17:23:45

1K+ Views

You may have noticed websites with distinctive scrollbars that give them a unique feel and appearance since custom scrollbars are becoming more and more common. A custom scrollbar can simply be implemented in a few different ways. The easiest method will be used in this article, which is CSS. We employ CSS to enhance the visual appeal of web pages in our applications. Using CSS, we can now change how the scrollbar looks. Let’s see how to make scrollbar custom arrows work on mobile devices. Making scrollbar custom arrows work on mobile devices Back in the day, scrollbars on websites ... Read More

How To Modify This JavaScript Code To Grab An Image URL From A JSON File, And Display It In HTML?

Yaswanth Varma
Updated on 20-Apr-2023 17:16:40

8K+ Views

This can be done by using the JavaScript method JSON.parse() to parse through the JSON file and extract the URL of the desired image. Then, an HTML img tag can be created with a source attribute set to this URL. Finally, this img tag can be appended to an existing HTML element in order to display it on your page. This will require some knowledge of basic JavaScript syntax, as well as familiarity with how JSON is structured and parsed within it. With these skills in hand, you should have no trouble modifying your code to achieve your goal! Let’s ... Read More

JavaScript Program for Check if an array is sorted and rotated

Prabhdeep Singh
Updated on 21-Apr-2023 09:16:19

176 Views

A sorted array is an array where all the elements are present in increasing order. We have given an array of size N and an array containing the distinct integers (which means every integer is present only one time). We have to check the array is sorted and rotated in a clockwise direction. Here we have to return ‘YES’ if the array is sorted and rotated otherwise, we have to return ‘NO’. Note − Here we are talking about the sorted and rotated means at least one rotation should be present. We cannot consider a sorted array as a sorted ... Read More

JavaScript Program for Ceiling in a sorted array

Prabhdeep Singh
Updated on 21-Apr-2023 09:10:43

139 Views

An array is a linear data structure that contains the objects and in sorted array elements are present in increasing order. We have given a sorted array and an integer x. We have to print the ceiling of the integer x from the given array. The ceiling of a sorted array with value x is the smallest element larger than or equal to x, while the floor is the largest member less than or equal to x. If the ceiling of the x does not exist in the array we have to print ‘ceiling of x does not exist in ... Read More

JavaScript Program for Block swap algorithm for array rotation

Prabhdeep Singh
Updated on 20-Apr-2023 17:22:31

148 Views

Rotation of the array elements means moving the elements of the given array to either the left or right side by some number of specific positions. We will assume the array in the cyclic form and rotate the elements of the edges to the other end. Block swap algorithm for array rotation means to rotate the elements of the array by a given number but not using the rotation but the swapping technique. We will implement both recursive as well as iterative approaches. Input The given array is [ 1, 2, 3, 4, 5, 6, 7]. The number of rotations ... Read More

JavaScript Program to Check If a Singly Linked List is Palindrome

Prabhdeep Singh
Updated on 20-Apr-2023 17:19:55

211 Views

A singly linked list is a linear data structure that is stored in a non-contiguous way in the memory and each block is connected by holding the address of the next block also known as a node. A palindrome can be explained as a set of characters, digits, etc, and it reads the same from both the front and backside. We will be given a singly linked list and have to find whether the values stored at the nodes are equal from both the front and backside. Input 1 -> 2 -> 3 -> 3 -> 2 -> 1 ... Read More

JavaScript program to check if a matrix is symmetric

Prabhdeep Singh
Updated on 20-Apr-2023 17:18:45

312 Views

A symmetric matrix is a special case of a matrix where both the matrix and the transpose of the matrix are the same. A matrix is a set of integers or numbers stored in a rectangular form that is equivalent to the 2D array and the transpose of the matrix is also a matrix that we can get by replacing all the rows with columns. We will be given a matrix and have to print whether it is a symmetric matrix or not. Input Mat = [[1, 2, 3], [2, 3, 8], [3, 8, ... Read More

JavaScript program to check if a given matrix is sparse or not

Prabhdeep Singh
Updated on 20-Apr-2023 17:17:36

107 Views

In mathematics, a matrix is a set of integers or numbers stored in a rectangular form which is equivalent to the 2D array in programming or JavaScript programming. A sparse matrix is a special type of matrix in which the number of zeros is strictly more than the total number of elements or numbers present in the given matrix. We will be given a matrix and we have to find whether the current matrix is a sparse matrix or not. Input Mat = [ [1, 0, 0], [0, 3, 4], [8, 0, ... Read More

Advertisements