Abhishek

Abhishek

68 Articles Published

Articles by Abhishek

Page 3 of 7

How to use font awesome icon as a cursor?

Abhishek
Abhishek
Updated on 20-Nov-2023 689 Views

In general, we see the design of cursor on any web page as an arrow by default or we can change the type of cursor to a particular type using cursor property of the CSS and assign it any kind of cursor of our choice such as pointer, grab, zoom in, zoom out etc. But, did you know? That we can change the type of cursor to any other type then the ones provided by the CSS. It is possible, as we can use any image to assign the design style to a cursor and can use any font-awesome icon ...

Read More

How to sort HTML elements by data-attribute?

Abhishek
Abhishek
Updated on 20-Nov-2023 891 Views

In this article, we are going to learn about the ways of sorting the child elements of an element in the HTML document with the help of data attribute. The are many data attribute available in HTML to use. We can sort the elements by using any of those data attributes. In this article, we will sort the elements with the help of two different data attributes, where one will sort the elements according to the length of the value given to it and another will sort according to the numerical values. The data attributes are listed below − ...

Read More

How to sort element by numerical value of data attribute using JavaScript?

Abhishek
Abhishek
Updated on 20-Nov-2023 670 Views

Generally, we sort arrays, objects and some other data types using some method of JavaScript. But, in this article, we are going to sort the child elements of an element whose values are in unsorted order using the data attribute of those child elements. In this article, we are going to learn about the two different ways or methods of sorting the child elements according to the value of their data attribute given to them. The methods we use to sort are listed below − By selecting the value of data attribute using the getAttribute() method. By selecting the ...

Read More

How to sort an array on multiple columns using JavaScript?

Abhishek
Abhishek
Updated on 20-Nov-2023 520 Views

A array with multiple columns is an array that contains multiple elements at single index or position OR we can say that it is an array of arrays that contains multiple arrays at each index of it and we have to sort that array according to the elements of those contained arrays. In this article, we are going to learn about the method of sorting an array of arrays with the help of sort() method. We will use the comparator function to compare the elements of inner arrays with each other and sort them accordingly. Let us see how we ...

Read More

How to sort an array of object by two fields in JavaScript?

Abhishek
Abhishek
Updated on 20-Nov-2023 472 Views

An array of objects is an array that contains all the elements in the form of JavaScript objects. Here, we are said to use an array of objects with two fields that means, have to use objects with two elements as elements of the array. In this article, we are going to learn about the method of sorting the array of objects by two fields in JavaScript. We can simply use the sort() method of JavaScript to sort the elements of an array and give it a cmp or the comparator function to define the order in which we want ...

Read More

How to sort a set in JavaScript?

Abhishek
Abhishek
Updated on 20-Nov-2023 556 Views

A set is also a data structure that is almost similar to the map data structure. The only difference between them is that map stores the elements in the form of key-value pair, while set does not it only stores a single value in the same order as it was inserted. It can also store primitive data types as well as objects as map does. A set contains all the elements in the same order as they are inserted. But, we can sort a set in any order whether in increasing or decreasing order of elements using the sort() method ...

Read More

How to sort a map in JavaScript?

Abhishek
Abhishek
Updated on 20-Nov-2023 2K+ Views

In JavaScript, Map is a type of data structure that stores the values in the form of key value pairs. It can store all types of data types, whether they are primitive or JavaScript objects. It stores the elements in the same order in which they are inserted, hence, when we iterate through its elements, it prints the elements in the same order as we have stored them. As we have discussed that the order of elements stored in a Map is same as we insert elements in that Map. But, we can also sort the elements of the map ...

Read More

How to solve the issue that arise while using performance.now() method in JavaScript?

Abhishek
Abhishek
Updated on 20-Nov-2023 285 Views

The performance.now() method is used to calculate the performance of the code written by any programmer or the coder. The performance.now() method will return a numerical value that will be the time taken by the written code to execute. The value returned by this method may vary every time we execute the code even for the same code. In today’s time, everyone wants to write the fast loading and the efficient code for a problem that can work on every parameter and fastest of all other solutions. So, to measure the efficiency and to make sure that the written code ...

Read More

How to set the maximum value of progress bar using HTML?

Abhishek
Abhishek
Updated on 20-Nov-2023 392 Views

The progress bar on any website is used to represent the percentage of any work that is completed like the download progress of any song or movie from any website. You can use the progress bar to show the amount of song or movie that is downloaded and remaining. In HTML, we can use the element to show a progress bar on the website to represent the amount of completed and the remaining work. You can handle the value of the progress bar on your own by defining the attributes with the element itself. Let us now understand ...

Read More

How to set one column control over height in Bootstrap?

Abhishek
Abhishek
Updated on 20-Nov-2023 168 Views

In this article, we will learn how we can set one column control over height in bootstrap? To solve this problem, first we make two different columns on the web page using Bootstrap classes, then we will use a div element inside one of those columns with position absolute to set the control of that particular column over height in bootstrap. Let us now practically understand the above approach or the process in details by implementing it inside the different code examples. Steps Step 1 − In the first step, we will define two different bootstrap columns inside a ...

Read More
Showing 21–30 of 68 articles
« Prev 1 2 3 4 5 7 Next »
Advertisements