- 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
Found 10711 Articles for Web Development
![Amit D](https://www.tutorialspoint.com/assets/profiles/13349/profile/60_63530-1512538715.jpg)
238 Views
jQuery filter() methodThe jQuery filter() method will return elements matching a specific criteria.ExampleYou can try to run the following code to learn how to work with jQuery.filter() method, Live Demo $(document).ready(function(){ $("p").filter(".myclass").css("background-color", "gray"); }); Tutorialspoint Free Text Tutorials Free Video Tutorials Connecting Tutors jQuery find() methodThe jQuery.find() method will return the descendant elements of the selected element.ExampleYou can try to run the following code to learn how to work with jQuery.find() method, Live Demo .myclass * { display: block; ... Read More
![Ali](https://www.tutorialspoint.com/assets/profiles/14292/profile/60_101553-1513052445.jpg)
268 Views
You would rather use it like below −jQuery.sap.require("sap.ui.thirdparty.jqueryui.jquery-ui-core");Note that jQuery does not have any security-related documentation on their site, but they are known to be aware of security and usually reacting quickly in case security issues are found within their library.SAPUI5 includes different versions of jQuery together with their own libraries, so also has the possibility to add custom security fixes to jQuery, if necessary.For more details you can refer to below SAP blog −https://blogs.sap.com/2017/04/30/how-to-include-third-party-libraries-modules-in-sapui5/
![Ricky Barnes](https://www.tutorialspoint.com/assets/profiles/13354/profile/60_84969-1512590781.jpg)
137 Views
The jQuery filter() method will return elements matching a specific criteria. The following are the parameters for the jQuery.filter() methods,S.NoParameterDescription1criteriaThis specifies a selector expression, or one or more elements. These elements are returned from a group of selected elements.2function(index)This specifies a function to run for every element. This is an optional parameter.ExampleYou can try to run the following code to work with jQuery.filter(),Live Demo $(document).ready(function(){ $("p").filter(".myclass").css("background-color", "gray"); }); Tutorialspoint Free Text Tutorials Free Video Tutorials Connecting Tutors
![Ricky Barnes](https://www.tutorialspoint.com/assets/profiles/13354/profile/60_84969-1512590781.jpg)
598 Views
To change the first and last elements of a list use the eq() method.ExampleYou can try to run the following code to change first and last elements of a list using jQuery:Live Demo $(document).ready(function(){ $("#list li:eq(2)").after($("#list li:eq(0)")); }); This year's ranking: India US UK Last year's ranking: India US UK
![Ricky Barnes](https://www.tutorialspoint.com/assets/profiles/13354/profile/60_84969-1512590781.jpg)
992 Views
To access element with nth index from an HTML page, use the jQuery eq() method. It is used to access the index of an element in jQuery. The eq() method refers the position of the element.ExampleYou can try to run the following code to access element with nth index in jQuery. Here, element with 2nd index is considered:Live Demo $(document).ready(function(){ $('ul li').eq(2).css({'background-color':'#E6B16A'});}); India US UK Australia
![Ricky Barnes](https://www.tutorialspoint.com/assets/profiles/13354/profile/60_84969-1512590781.jpg)
748 Views
To access the index of an element in jQuery, use the eq() method. The eq() method refers the position of the element.ExampleYou can try to run the following code to learn how to access index of an element in jQuery,Live Demo $(document).ready(function(){ $('ul li').eq(2).css({'background-color':'#E6B16A'});}); India US UK Australia
![Ricky Barnes](https://www.tutorialspoint.com/assets/profiles/13354/profile/60_84969-1512590781.jpg)
204 Views
To fetch the nth div from an HTML page, use the jQuery eq() method. It is used to access the index of an element in jQuery. The eq() method refers the position of the element.ExampleYou can try to run the following code to learn how to fetch nth div from an HTML page using jQuery. Here, we will fetch the 2nd div:Live Demo $(document).ready(function(){ $("#button1").click(function(){ alert($("div:eq(1)").text()); }); }); Paragraph One Paragraph Two - 2nd div selected Paragraph Three Which div?
![Amit D](https://www.tutorialspoint.com/assets/profiles/13349/profile/60_63530-1512538715.jpg)
781 Views
Here’s how you can get objects by ID Selector (#id), by Class Selector (.class), by Tag, and Attribute (.attr()).Get Object by Class SelectorExampleThe element class selector selects all the elements which match with the given class of the elements.Live Demo jQuery Selector $(document).ready(function() { $(".big").css("background-color", "yellow"); }); This is first ... Read More
![Amit D](https://www.tutorialspoint.com/assets/profiles/13349/profile/60_63530-1512538715.jpg)
325 Views
To escape square brackets in jQuery selectors is quite easy. Let’s see with an example of escaping the brackets in the name of the box.ExampleWhatever you will select, will get added to the textarea on button click.Live Demo $(document).ready(function() { $("#addnow").click(function () { $("#myselect :selected").each(function () { $("#text").val($("#text").val() + $(this).text() + ""); }); }); }); email@example.com David Select and Click to Add
![Amit D](https://www.tutorialspoint.com/assets/profiles/13349/profile/60_63530-1512538715.jpg)
3K+ Views
ExampleYou can try to run the following code to write a jQuery selector to find links with # in href. Here,^ is used to find links starting with # in href.Live Demo $(document).ready(function(){ $('a[href^="#"]').click(function(){ alert('Success! Selected link starting with # in href.'); }); }); Demo C++