Found 766 Articles for JQuery

How to select a subset of the matched elements in jQuery()?

Amit D
Updated on 09-Dec-2019 08:55:37

186 Views

The slice( start, end ) method selects a subset of the matched elements. The following are the parameters of the slice() method:start − Where to start the subset. The first element is at zero. Can be negative to start from the end of the selection.end − Where to end the subset excluding end element. If unspecified, ends at the end of the selection.ExampleYou can try to run the following code to select a subset of the matched elements using the slice() method:Live Demo           jQuery slice() method                   ... Read More

How does jQuery.map() method work in jQuery?

Amit D
Updated on 09-Dec-2019 08:57:13

327 Views

The map method translates a set of elements in the jQuery object into another set of values in a jQuery array which may, or may not contain elements.The following are the parameters of jQuery.map() method:callback − The function to execute on each element in the set.ExampleYou can try to run the following code to learn how to work with jQuery.map() method:Live Demo           jQuery Map Method                              $(document).ready(function(){                         var ... Read More

How does jQuery.eq() method work in jQuery?

Amit D
Updated on 09-Dec-2019 08:58:18

115 Views

If you want to return an element with a definite index number of the selected elements, then use the eq() method. The first element has index 0, the second element has index 1, etc. Yes, the index number starts at 0.ExampleYou can try to run the following code to learn how to work with jQuery.eq() method,Live Demo   $(document).ready(function(){     $("p").eq(3).css("background-color", "gray");   });  Tutorialspoint  Free Learning  Free Text Tutorials  Free Video Tutorials  Tutor Connect

How does jQuery.find() method work in jQuery?

Amit D
Updated on 09-Dec-2019 09:01:28

78 Views

The 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;     border: 2px solid red;     padding: 2px;     margin: 10px;     color: red; }   $(document).ready(function(){      $("ol").find("span").css({"background-color": "yellow", "border": "5px solid green"});   }); body   div     ol         li         The descendant element              

How to locate descendant elements of a particular type of elements in jQuery?

Amit D
Updated on 09-Dec-2019 09:02:38

268 Views

Use the jQuery find() method to locate descendant elements of particular type of elements in jQuery. The 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;     border: 2px solid red;     padding: 2px;     margin: 10px;     color: red;  }   $(document).ready(function(){     $("ol").find("span").css({"background-color": "blue", "border": "5px solid gray"});   }); body   div     ol         li         The descendant element              

What is the difference between filter() and find() in jQuery?

Amit D
Updated on 09-Dec-2019 07:40:19

202 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

Including third party libraries in SAPUI5 Project

Ali
Ali
Updated on 26-Feb-2020 06:20:56

231 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/

How does jQuery.filter() method work in jQuery?

Ricky Barnes
Updated on 13-Jun-2020 12:34:34

113 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

How to change first and last elements of a list using jQuery?

Ricky Barnes
Updated on 18-Dec-2019 07:35:28

567 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

How to access element with nth index in jQuery?

Ricky Barnes
Updated on 09-Dec-2019 07:50:04

894 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

Advertisements