0% found this document useful (0 votes)
16 views

J Query Append HTML

The jQuery append() method inserts content to the selected element and appends it to any existing elements, while the html() method inserts HTML elements and replaces the current element. Both methods can be chained together with other jQuery commands to perform multiple actions on the same element, like changing styles and animating slides.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

J Query Append HTML

The jQuery append() method inserts content to the selected element and appends it to any existing elements, while the html() method inserts HTML elements and replaces the current element. Both methods can be chained together with other jQuery commands to perform multiple actions on the same element, like changing styles and animating slides.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 4

JQUERY APPEND() AND

HTML() METHODS
JQUERY APPEND()

Insert contents to the selected element and


append to existing elements
JQUERY HTML()

Inserts html elements to selected elements and replaces


the current element.
JQUERY CHAINING

With jquery, you can chain together actions/methods.


allows us to run multiple jQuery commands, one
after the other, on the same element(s).
EXAMPLE
$("#p1").css("color", "red").slideUp(2000).slideDown(2000)
or
$("#p1").css("color", "red")
.slideUp(2000)
.slideDown(2000);

You might also like