Documente Academic
Documente Profesional
Documente Cultură
jQuery is not a programming language but a well written JavaScript code. It is a JavaScript
code, which do document traversing, event handling, Ajax interactions and Animations.
3. Whether jQuery HTML work for both HTML and XML documents?
No, jQuery HTML only works for HTML documents not for XML Documents.
Show()
Hide()
Toggle()
FadeIn() and
FadeOut()
Efficiency of web page increases when minimized version of jQuery is used.min.js file will
be more than 50% less than the normal js file. Reduction in the file size makes the web
page faster.
jQuery is a library of JavaScript file and it consists of DOM, event effects and the Ajax
functions. jQuery is said to be a single JavaScript file.
Mac, Windows and Linux are more compatible with the jQuery.
Form
Keyboard
Mouse
Browser
Document Loading
25. What are the four parameters used for jQuery Ajax method?
Question 13. Can You Give An Example Of Selecting An Element Based On Its Class
Name ?
Answer :
Below is the sample code snippet:
$(‘.MyControl’).Hide()
Question 5. Will Jquery Support Ajax ? Mention Some Ajax Methods Which Can Be Used
In Jquery?
Answer :
Yes. Jquery supports AJAX.
Below are some of the methods of AJAX:
o Get()
o Post()
o GetJSON()
o Ajax()
Under the hood jQuery is JavaScript but jQuery makes writing JavaScript code much easier.
For example if we want to select a div having id "container" then in plain JavaScript we will
write the following code.
var el = document.getElementById('container');
var el = $('#container');
If we pass a selector then it will return jQuery object with some methods which can be used to
perform different tasks.
In the following example we are selecting a div having id 'container' and hiding it from the page.
var el = $("#container");
el.hide();
$(document).ready(function() {
});
<script
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
How will you make a GET request to the following API using jQuery?
API: https://api.github.com
In the following code we are making a GET request to the given API and printing the response in
the console.
$.ajax({
url: 'https://api.github.com',
method: 'GET',
success: function(data) {
console.log(data);
});
https://www.youtube.com/watch?v=melCBtSYQqU