jQuery Articles

Page 31 of 42

Where do we use $.extend() method in jQuery?

David Meador
David Meador
Updated on 11-Mar-2026 1K+ Views

The jQuery.extend() method is used to merge contents of two or more objects together. The object is merged into the first object. You can try to run the following code to learn how to use extend() method −Example $(document).ready(function() {   $("#button1").click(function() {     var obj1 = {       maths: 60,       history: {pages: 150,price: 400,lessons: 30},       science: 120     };     var obj2 = {       history: { price: 150, lessons: 24 },       economics: 250     };     $.extend(true, obj1, obj2);     $("#demo").append(JSON.stringify(obj1));    }); });    Result    

Read More

What is the difference between jQuery.animate() and jQuery.hide()?

David Meador
David Meador
Updated on 11-Mar-2026 410 Views

jQuery animate() The animate( ) method performs a custom animation of a set of CSS properties. Here is the description of all the parameters used by this method − params − A map of CSS properties that the animation will move toward. duration − This is optional parameter representing how long the animation will run. easing − This is optional parameter representing which easing function to use for the transition. callback − This is optional parameter representing a function to call once the animation is complete. You can try to run the following code to learn how to ...

Read More

How to add a new row in a table using jQuery?

Alshifa Hasnain
Alshifa Hasnain
Updated on 12-Feb-2025 2K+ Views

In this article, we will learn to add a new row to a table using jQuery. jQuery, a fast and lightweight JavaScript library, in web development, dynamically adding or removing rows from a table is a common requirement, especially when dealing with forms or data entry interfaces. Use CasesThis functionality is particularly useful in scenarios such as − Creating dynamic forms where users can add multiple entries (e.g., adding multiple email addresses, phone numbers, or product details). Building data entry interfaces where the number of rows is not fixed. ...

Read More

How to apply multiple CSS properties using jQuery?

Alex Onsman
Alex Onsman
Updated on 01-Jul-2024 17K+ Views

Apply multiple CSS properties using jQuery CSS( {key1:val1, key2:val2....}) method. We can apply as many properties as we like in a single call. Syntax In the below mentioned way we can use the CSS. Here you can pass key as property and val as its value of that property. selector.css( {key1:val1, key2:val2....keyN:valN}) Define Multiple CSS Attributes in jQuery As we mentioned earlier that we will be using jQuery css() method to apply multpile CSS properties on any element. First we will use '$(selector)' to select the element where we wants to apply ...

Read More

Create a paragraph element with some text and append it to end of document body using jQuery

Nikhilesh Aleti
Nikhilesh Aleti
Updated on 09-Feb-2024 195 Views

In this article, the task is to create a paragraph element with some text and append it to end of document body using jQuery. Using jQuery, it is easy to add new elements/content in a particular position inside an HTML document. We have four methods that are used to add new content: append() − This method adds the content at the end of selected elements. prepend() − This method adds the content at the beginning of selected elements. after() − This method adds the content after the selected elements. before() − This method adds the content before the selected ...

Read More

Difference between hover() and mouseover() methods in jQuery

Yaswanth Varma
Yaswanth Varma
Updated on 19-Jan-2024 500 Views

The JavaScript library "jQuery" is regarded as the most effective lightweight JavaScript library. Based on the built-in methods, it encapsulates several lines of JavaScript code to carry out a given functionality. A single line of code can easily be used to call these methods. While doing the necessary operation, it shortens the code. Users can use a single line of code to invoke the "hover()" and "mouseover()" jQuery methods when their relevant events occur to carry out the task. Let’s dive into the article to learn more about the difference between hover() and mouseover() methods in jQuery. Before learning about ...

Read More

Explain the concept of fade effect in jQuery?

Yaswanth Varma
Yaswanth Varma
Updated on 19-Jan-2024 294 Views

The jQuery fade effect combines the ability to display and hide certain items while also including a transition animation. You can observe that the elements gradually fade in and out rather than appearing and disappearing right away. An effect like this could make the website look more spectacular and be more pleasant. There are different methods used for the creation of fading effects in jQuery like .fadeIn(), .fadeOut() , .fadeToggle() and .fadeTo() . Let’s look into them one by one. jQuery fadeIn() method The opacity of the matching items is animated using the .fadeIn() method. It is the same as ...

Read More

Flipping Window Effect

Yaswanth Varma
Yaswanth Varma
Updated on 19-Jan-2024 219 Views

The "flipping window" effect, also called the "window rotation" effect, is a visual occurrence that takes place when an object or scene is seen via a number of spinning windows or panels. To give viewers an immersive and engaging experience, the flipping window effect is frequently employed in interactive displays, digital animations, and art installations. Let’s dive into the article to draw a flipping window effect. It can be done by using CSS @keyframes. Let’s have a quick look at it before we jump into the article. CSS @keyframes Keyframes are used for animation in CSS. It provides you more ...

Read More

How slideDown() function works in jQuery event handler?

Yaswanth Varma
Yaswanth Varma
Updated on 19-Jan-2024 203 Views

The JavaScript library "jQuery" is regarded as the most effective lightweight JavaScript library. Based on the built-in methods, it encapsulates several lines of JavaScript code to carry out a given functionality. A single line of code can easily be used to call these methods. While doing the necessary operation, it shortens the code. The sliding effect is one of the more useful animation-designing methods among the many Effect-creating techniques that are available with jQuery. Let’s dive into the article to learn about the slideDown()function in jQuery. slideDown() in jQuery A sliding effect can be produced with the slideDown() method ...

Read More

How to add a new class to an element that already has a class using jQuery?

Yaswanth Varma
Yaswanth Varma
Updated on 19-Jan-2024 225 Views

jQuery is a well-known JavaScript library that makes it easier to manipulate HTML elements, handle events, and carry out numerous operations on web pages. Adding or changing HTML element classes can also be done using jQuery. Using it, we can easily add a new class to an element that already has one or more classes. This enables you to combine many styles or actions on a single element without deleting any already-existing classes. Let’s dive into the article to learn about adding a new class to an element that already has a class. This can be done by using the ...

Read More
Showing 301–310 of 413 articles
« Prev 1 29 30 31 32 33 42 Next »
Advertisements