How to uncheck a radio button using JavaScript/jQuery?

Mohit Panchasara
Updated on 15-Mar-2026 23:19:00

30K+ Views

Sometimes, we require to uncheck a radio button using JavaScript or jQuery. For example, we use the radio button in the form. When the user presses the clear form button, we need to uncheck all radio buttons and allow again users to choose any option from the radio button. In this tutorial, we will learn various methods to uncheck single or multiple radio buttons using jQuery or JavaScript. Using JavaScript to Uncheck Radio Button We can access the radio button in JavaScript using id, tag, name or other ways. After that, we can uncheck the radio button's ... Read More

Checking a Checkbox with JavaScript

AmitDiwan
Updated on 15-Mar-2026 23:19:00

637 Views

In JavaScript, you can programmatically check a checkbox by setting its checked property to true. This is useful for form validation, user interactions, or initializing form states. HTML Structure First, let's look at a basic checkbox structure: John David Using the checked Property The checked property is a boolean that determines whether a checkbox is selected. Set it to true to check the checkbox, or false to uncheck it. Checkbox Example ... Read More

Longest subarray which only contains strictly increasing numbers JavaScript

AmitDiwan
Updated on 15-Mar-2026 23:19:00

357 Views

We are required to write a JavaScript function that takes in an array of numbers as the first and the only argument. The function should then return the length of the longest continuous subarray from the array that only contains elements in a strictly increasing order. A strictly increasing sequence is the one in which any succeeding element is greater than all its preceding elements. Example const arr = [5, 7, 8, 12, 4, 56, 6, 54, 89]; const findLongest = (arr) => { if(arr.length == 0) { ... Read More

Finding the smallest good base in JavaScript

AmitDiwan
Updated on 15-Mar-2026 23:19:00

212 Views

For an integer num, we call k (k >= 2) a good base of num, if all digits of num base k are 1. For instance: 13 base 3 is 111, hence 3 is a good base for num = 13 Problem We are required to write a JavaScript function that takes in string str that represents a number as the only argument. The function should return the string representation of the smallest possible number which is a good base for str. For example, if the input to the function is: const str = ... Read More

How to build a random quote generator using HTML, CSS, and JavaScript?

Kalyan Mishra
Updated on 15-Mar-2026 23:19:00

2K+ Views

In this tutorial, we'll build a random quote generator using HTML, CSS, and JavaScript. The application fetches quotes from an API and displays them in an elegant interface with a button to generate new quotes. Project Overview Our quote generator will include: Clean HTML structure with quote display area Responsive CSS styling with hover effects JavaScript logic to fetch quotes from type.fit API Random quote selection and display functionality HTML Structure First, let's create the HTML template ... Read More

How to check if an Image has crop applied using FabricJS?

Rahul Gurung
Updated on 15-Mar-2026 23:19:00

343 Views

In this tutorial, we are going to show how you can check if an Image has crop applied using FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to find whether an Image has crop applied, we use the hasCrop method. This method returns false in case of crop is not applied, or the applied crop value in case if it is applied. Syntax hasCrop(): Boolean | Number ... Read More

Adding a pattern with image and colour to a Polygon using FabricJS

Rahul Gurung
Updated on 15-Mar-2026 23:19:00

1K+ Views

We can create a Polygon object by creating an instance of fabric.Polygon. A polygon object can be characterized by any closed shape consisting of a set of connected straight line segments. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to add pattern with image and colour to a Polygon, we can use the Pattern class in FabricJS. Syntax new fabric.Pattern( options: Object, callback: function ) Parameters ... Read More

How to highlight an object when a mouse is hovered over it using FabricJS?

Rahul Gurung
Updated on 15-Mar-2026 23:19:00

2K+ Views

We can create a Polygon object by creating an instance of fabric.Polygon. A polygon object can be characterized by any closed shape consisting of a set of connected straight line segments. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. FabricJS provides us with an extensive set of events with which we can create different effects. Since we want the change to occur when the mouse is hovered, we will use the mouse:move event which is fired when the mouse is moved. Our second requirement ... Read More

Can JavaScript be used for Android Development?

Rushi Javiya
Updated on 15-Mar-2026 23:19:00

3K+ Views

JavaScript has become a powerful option for Android app development through hybrid frameworks and cross-platform solutions. While not traditionally used for native Android development, JavaScript enables developers to create mobile applications that run on Android devices using web technologies. Modern JavaScript frameworks like React Native, Ionic, and Cordova allow developers to build Android apps using familiar web development skills. This approach combines the accessibility of JavaScript with the functionality of mobile applications. How JavaScript Works for Android Development JavaScript can be used for Android development through several approaches: Hybrid Apps: Web applications ... Read More

How to choose a background color through a color picker in JavaScript?

Rushi Javiya
Updated on 15-Mar-2026 23:19:00

4K+ Views

While working with HTML and CSS to create a web page, we require to choose a color from the color picker. Also, sometimes we may require to select the background color through the color picker input. In this tutorial, we will learn different approaches which allow users to choose a background color from the color-picker input, and when the user selects a new color, it should change the background color. Using the Color Picker with Button Click In HTML, color picker input allows users to choose a color from that. We can get a selected color value ... Read More

Advertisements