- 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 740 Articles for JQuery

68 Views
If you want to add element to an existing group of elements, then use the add() method.S.NoParameterDescription1.elementSet the element, a jQuery object, one or more than one elements or HTML snippet, which you want to add to the existing group of elements2.contextThis parameter is optional. It sets the point at which the selector expression begins matching.ExampleYou can try to run the following code to learn how to work with jQuery.add() method −Live Demo $(document).ready(function(){ $("h1").add("p").css("background-color", "gray"); }); Tutorialspoint Text Tutorials for free. Video Tutorials for free.

3K+ Views
To get substring of a string in jQuery, use the substring() method. It has the following two parameters:from: The from parameter specifies the index where to start the substring.to: The to parameter is optional. It specifies the index where to stop the extraction. This is an optional parameter, which extracts the remaining string, when nothing is mentioned.ExampleYou can try to run the following code to learn how to get substring of a string in jQuery:Live Demo jQuery subtring ... Read More

53 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

113 Views
You are thinking correctly for your requirement. What you can do is, use the read method for each entityset to read the oData. In the success callback for this method, you can parse the result objects into a corresponding JSON model.Now, you can have working logic as per which:When you online, uses the additional layer to fill the JSON model from the oData that has been readWhen offline, you can read from local storage.

160 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

246 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

94 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

58 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

221 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

160 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