JQ u e r y Q u i z I - GitHub Pages
JQuery Quiz I
1. In jQuery terminology, what is the difference between the ¡°jQuery
function¡± and the ¡°jQuery object¡±?
Answer:
JQuery Function
JQuery Object
var headings = $( "h1" );
var firstHeading = headings.eq( 0
);
Notation : $(¡°p¡±)
firstHeading is a JQuery object
Simpler syntax for the dom method.
Not represent the dom method.
Can handles selectors, html elements
and javascript objects
When the jQuery function is invoked
with a CSS selector, it will return a
jQuery object wrapping any element(s)
that match this selector.
2. Write jQuery code to find all h1 elements that are children of a div element
and make their background color red.
Sample HTML:
abc
div-1
div-2
xyz
//JqueryCode ANSWER:
$(document).ready(function(){
$(¡°div h1¡±).css(¡°background-color¡±: ¡°red¡±, ¡°font-size¡±: ¡°20px¡±));
});
3. Use a jQuery method to insert the text "YES!" at the end of the
Element.
$(document).ready(function(
$(¡°p¡±).append(¡° Yes!!¡±);
));
Is jQuery FUN or what?
Ref:
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- javascript jquery and ajax university of western australia
- jquery 17 visual cheat sheet v6 github
- html css bootstrap javascript and jquery read the docs
- beginner s essential jquery cheat sheet websitesetup
- jq u e r y q u i z i github pages
- using jquery
- jquery 1 5 visual cheat sheet v2
- jquery degree college of physical education
- declare string array in jquery
- jquery ui library