Found 8895 Articles for Front End Technology

How to use Paper Component in ReactJS?

Rushi Javiya
Updated on 07-Mar-2023 11:57:52

1K+ Views

In Material UI, the Paper component is very similar to the card component, and basically, it also creates a card of the required dimensions. The main difference between the Card and Paper components is the ‘Elevation’ prop. The Elevation props allow setting the box shadow for the Paper component to add 3D effects. Syntax Users can follow the syntax below to use the Paper component of Material UI. Example 1 (Basic use of Paper Component) In the example below, we added the Paper component inside the Box component of Material UI. Also, we have set the dimensions ... Read More

How to use Link Component in ReactJS?

Rushi Javiya
Updated on 07-Mar-2023 11:54:14

575 Views

The links are important for any application to navigate different web pages. We can use the tag to create links in the HTML. However, the Material UI library provides the Link component to create a stylish link. Users can execute the below command to install the Material UI library in the React project. npm install @mui/material @emotion/react @emotion/styled Syntax Users should follow the syntax below to use the Link component of Material UI. Link In the above syntax, href takes a link to the targeted web page. Example 1 (Basic Link ... Read More

How to use jQuery touch events plugin for mobiles?

Rushi Javiya
Updated on 07-Mar-2023 13:47:30

700 Views

JavaScript and jQuery contain various plugins, and every plugin contains a couple of functions. JavaScript plugin works as a library, and we can use its code directly in our code. The jQuery touch event plugin is also a library used to detect touch events in mobile devices and execute some functions when a touch event occurs. Using the CDN, we can add the jQuery touch event plugin to the HTML. If users are working with the Node application, they should execute the below command in the project directory to add the jQuery touch events plugin to the application. ... Read More

How to use input readonly attribute in jQuery?

Rushi Javiya
Updated on 07-Mar-2023 11:45:12

12K+ Views

The readonly is an HTML attribute that we can add to any HTML tag. Whenever we use the readonly attribute with any HTML element, it becomes non-editable. Users can’t write into the text field but can only read. In this tutorial, we will learn to add the readonly attribute to the HTML element using the various methods of jQuery. Use the attr() method of jQuery The attr() method of jQuery sets the attribute to the HTML element. It takes two parameters, and we can pass the attribute name as the first parameter and the attribute value as the second ... Read More

How to use Grid Component in Material UI?

Rushi Javiya
Updated on 07-Mar-2023 11:41:14

739 Views

The grid means the structure of rows and columns like a table. When we create a table using the HTML tag, we can create every row and column of different dimensions, but the Grid component of the Material Ui library allows us to do so. We can use the Grid component of the Material UI as a container and item. Also, we can adjust the grid automatically according to the dimensions of the device screen. Users first need to install the Material Ui library to use the Grid component in the React project using the below command. ... Read More

How to check if CSS property is supported in browser using JavaScript?

Aman Gupta
Updated on 07-Mar-2023 11:26:43

2K+ Views

Overview In today's world there are various browsers available on the system. So sometimes there are certain Cascading Style Sheets (C.S.S.) property that does not run on that browser. So to check which CSS properties are supported for that specific browser, JavaScript has the in-built method CSS.supports(), which checks whether that specific property is supported by the browser or not. The supports() method is supported by all the browsers: Opera, Edge, Chrome, and Firefox. Syntax The CSS.supports() method takes a key-value pair as input, which is in String format. The basic syntax used is − CSS.supports(“propertyName:value”); supports() − ... Read More

How to use Fab Component in Material UI?

Rushi Javiya
Updated on 07-Mar-2023 11:34:32

646 Views

The fab component is a short form of the floating action button. You may have seen the floating action button in many Android applications at the bottom right corner. However, it's not fixed that you need to add the floating action button at the bottom right corner, but it is the most used place. Users can use the Fab component of Material UI to create floating action buttons with different icons. To start with the Material UI, execute the below command in the terminal in the React project directory. npm install @mui/material @emotion/react @emotion/styled Syntax Users can ... Read More

How to trigger the setInterval loop immediately using JavaScript?

Rushi Javiya
Updated on 07-Mar-2023 11:16:20

3K+ Views

The setInteral() method allows us to continuously trigger a callback function after every particular time period. We can pass the callback function as the first parameter to trigger after every time period, and the time period in the milliseconds as a second parameter. The setInterval() method invokes the callback function after a particular number of milliseconds for the first time. Now, the problem is we need to invoke the callback function instantly for the first time at 0 milliseconds, and after that, we need to invoke it continuously in the given time period. Example In the example below, we created ... Read More

How to trigger the onchange event on input type=range while dragging in Firefox?

Rushi Javiya
Updated on 07-Mar-2023 11:14:21

8K+ Views

The range input allows a selection of any value between the particular range of values. Using JavaScript, we can get the input value that users have entered in the range input. The onchage event triggers only when the user releases the mouse key. So, it will not update the value while dragging the range slider. You can face this problem in all browsers, such as chrome, safari, but not only in Firefox. Users can follow the example below to check whether the input value is updated while dragging the range input. Example 1 (Input values will not update while dragging ... Read More

How to trigger the HTML button after hitting enter button in the textbox using JavaScript?

Rushi Javiya
Updated on 07-Mar-2023 11:11:05

4K+ Views

Generally, developers add the submit button to submit the input field's text. However, if they allow users to submit the input value by pressing enter, it improves the UX of the application. Here, we will learn the general way to detect the key press using the key listener event. Afterwards, we can perform any operation whenever the user presses the enter key button. Syntax Users can follow the syntax below to detect whenever the user presses the enter key. input.addEventListener("keypress", function (event) { if (event.keyCode == 13) { // enter pressed ... Read More

Advertisements