- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What does the .end() function do in jQuery?
The end() method reverts the most recent destructive operation, changing the set of matched elements to its previous state right before the destructive operation.
Example
You can try to run the following code to learn how to work with end function in jQuery:
<html> <head> <title>jQuery end() function</title> <script src = "https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("p").find("span").end().css("border", "2px blue solid"); }); </script> <style> p{ margin:10px; padding:10px; } </style> </head> <body> <p><span>Hello</span> World!</p> </body> </html>
- Related Articles
- What does html() method do in jQuery?
- What does jQuery.andSelf( ) method do in jQuery?
- What does jQuery.children() method do in jQuery?
- What does jQuery.offset() method do in jQuery?
- What does jQuery.serialize() method do in jQuery?
- What does reload() function do in Python?
- What does raw_input() function do in python?
- What does input() function do in python?
- What does print() function do in Python?
- What does open() function do in Python?
- What does close() function do in Python?
- What does os.pipe() function do in Python?
- What does getattr() function do in Python?
- What does hasattr() function do in Python?
- What is the jQuery destructive method end()?

Advertisements