Abhishek

Abhishek

68 Articles Published

Articles by Abhishek

Page 4 of 7

How to find duplicate values in a JavaScript array?

Abhishek
Abhishek
Updated on 02-Sep-2023 73K+ Views

In this tutorial, we will discuss how we can find duplicate or repeating values in a JavaScript array using different methods or approaches to reach the solution to this problem. Below is the list of the approaches or methods we can use to solve the problem of finding duplicates − By simply Traversing the Array Using the filter() and indexOf() Methods Using the Set object and has() Method Let us discuss all of the above approaches to find duplicates in the JavaScript array − By Simply Traversing the Array Traversing the array using a nested for loop to ...

Read More

How to use media queries in a mobile-first approach in HTML?

Abhishek
Abhishek
Updated on 31-Aug-2023 252 Views

Building a responsive web design is a must have and a skill that every developer must be aware and know how to build a completely responsive nug free website. Which appears differently on different screen width devices and will not look oddly or overflow when opened on different devices. It is very important to know everything about building a mobile-first design starting from approach to build until the design is ready with no bugs and tweaks. A responsive website must have a good user experience, user interface and design for all devices with same content. To build a fully responsive ...

Read More

How to use margin, border and padding to fit together in the box model?

Abhishek
Abhishek
Updated on 31-Aug-2023 518 Views

In general, we use the box model to define all these properties to use them together. Box model is a model that is used to define the different CSS properties that a box contains like the margin, border, padding and the most important content. A box model in CSS generally defines the properties like margin, border, padding and the content. Before understanding how to use padding, margin, border and content to fit together in a box model. Let us understand what these properties actually does when they applied on a container. Content − The content is the most important and ...

Read More

How to use image overlay correctly with Bootstrap?

Abhishek
Abhishek
Updated on 31-Aug-2023 5K+ Views

The image overlay is a property by using which we can show any text, image, links and much more over an image. It allows us to set text, images or other things on an image to make it look pretty. We can us the image overlay class of bootstrap defined as card-img-overlay. This class will allow us to write text or align text over an image and use the image as a background to the text or the links we align over it. What are the advantages of using this class provide? It allows you to write or align ...

Read More

CSS units – %, em, rem, px, vh, vw

Abhishek
Abhishek
Updated on 08-May-2023 1K+ Views

In CSS or the Cascading Style Sheet, there are many units available to represent the values of different properties in different ways according to the need. The CSS properties like: font-size, height, width and line-height etc are used to define the different properties to a container. The values of these properties can be assigned in the form of different units. In this article, we are going to learn about the different CSS units in details and implement them practically to understand use of each one of them. There are many CSS units available in CSS, but in this article ...

Read More

How to add a custom right-click menu to a webpage?

Abhishek
Abhishek
Updated on 08-May-2023 3K+ Views

In today’s time, when you right click on any web page there will be a list of some with some options and functionality pops up. This popup menu is also known as the context menu which is a default popup menu given by browser. The items in the list of this menu varies in different browsers. Some browsers provide more functionality while some provides limited. But here’s a way to add your own custom context menu or the right click menu on your web page with as much as options as you want. But before adding the custom context menu, ...

Read More

How to make the cursor to hand when a user hovers over a list item using CSS?

Abhishek
Abhishek
Updated on 08-May-2023 306 Views

In general, if we hover or take the cursor over an element in HTML document the cursor by default appears as an arrow or a selector if we hover it over a text. But, we can change the behaviour of the cursor on hover to selected elements to any type of available cursor types using the CSS property. Let us now discuss and understand how you can change the behaviour of the cursor on hover to any particular element using the :hover state and the cursor property of CSS. Cursor Property The cursor property in CSS comes with a lot ...

Read More

How to retrieve stored value from div element using jQuery?

Abhishek
Abhishek
Updated on 08-May-2023 1K+ Views

In some situations, we need to retrieve or get the text value stored inside a particular div element to use some condition, if the text is dynamic or for some other tasks in jQuery. By getting the value stored in the div element, we can perform any task based on the value of the element in jQuery. In jQuery, we can retrieve or get the stored value of a div element using three different methods. The methods are listed below − By using the text() method By using the html() method Let us now understand working of each ...

Read More

How to reverse array of DOM elements using jQuery?

Abhishek
Abhishek
Updated on 08-May-2023 762 Views

The array of DOM elements is an array of same multiple elements or of those elements which contains same class or the selecting attribute. Our task is to reverse an array of DOM elements using jQuery. There will be a lot of ways to reverse an array of DOM elements. But, in this article, we are going to discuss about the two methods to reversing and array of DOM elements. By using a for loop By using the reverse() method Let us now discuss both of these methods in details by practically implementing them with the help of ...

Read More

How to Change the Time Interval of setinterval() Method at RunTime using JavaScript ?

Abhishek
Abhishek
Updated on 17-Feb-2023 3K+ Views

The setInterval() method is used to call a particular block of code again and again after a particular interval of time that is given to it in its round braces as parameter. The setInterval() method accepts two parameters, the first is the code that has to be executed again and again while the second is the time in which the code has to be execute again. In this article, we are going to learn about the methods of changing the time interval of the setInterval() method at the runtime. So that, it will execute the given code at the irregular ...

Read More
Showing 31–40 of 68 articles
Advertisements