JS

jQuery: 4 Ways to Move an Element to another Element

We are going to use jQuery’s .appendTo(), .detach(), insertAfter(), .insertBefore() and .prepandTo() to move an HTML element to another element using jQuery. HTML...

jQuery: 2 Ways to Add Rows to a Table

In this jQuery tutorial, you are going to find the two proper ways to add rows to a table. Let’s find out: Method 1 Whether you add a <tbody> to a table or not, most...

jQuery: 2 Ways to Get Selected Option Text from a Dropdown

Are you looking for a way to get selected option text from a dropdown with jQuery? Don’t worry; we have the two methods for you. Suppose, you have HTML like:...

jQuery: 2 Ways to Delay the keyup() handler Until a User Stops Typing

Are you tired of sending Ajax requests at every keypress when using the .keyup() handler? This tutorial will discuss the two ways to delay the keyup() handler until a user pauses...

How to Add a Property to a JavaScript Object

Are you looking for a simple way to add a property to a JavaScript object? The following JavaScript snippet would do the work. Also, see How to Remove a Property from a JavaScript...

3 Ways to Capitalize the First Letter / Character of a String Using JavaScript

In this tutorial, you are going to learn the three methods to capitalize the first letter / character of a string using JavaScript. Table of Contents Method 1 Method 2 Method 3...

4 Ways to Validate Email Address Using JavaScript and Regular Expression

Are you looking for a way to validate email address using JavaScript and regular expression? Not one, not two, following are the 4 ways for applying JavaScript email validation...

4 ways to get query string values from URL in JavaScript

Here, we are going to discuss 4 ways to get query string/parameter values from a URL using JavaScript. The first method features a simple JavaScript function, and the other three...

5 Ways to Check if Checkbox is Checked in jQuery

This tutorial will elaborate different ways to check if a checkbox is checked using jQuery and do something if checked. Table of Contents .prop() elementByID.checked .is() .length...

3 Ways to Check If Element is Visible or Hidden using jQuery

Do you want to test whether an element is visible or hidden using jQuery? Here, you’ll learn three approaches to finding out if an element is visible or hidden with jQuery....