1 node:
parentNode: parent node
childNodes: set of child nodes
firstChild: first child node
lastChild: the last child node
nextSibling: a next sibling node
previousSibling: a node on the same level
2 jquery, before each drink we can refer to a file and then referenced Jquery Jquery own file, the referenced file needs above their own document, written on the selector below
$(‘#id’);$(‘p’);$(‘[href=”#”]’);$(‘.cla’)
3 wording event properties
$ ( 'P') the Click (function () {});. JQ Conflict: $ js other can be used, the release of $ var jq = jQuery.noConflict ()
4
1 Hide / Show
$(‘div’).hide();$(‘div’).show();$(‘div’).toggle();
2, Fade
fadeIn (speed, callback); Fade
fadeOut(speed,callback);淡出
fadeToggle (speed, callback); fade switch;
fadeTo (speed.opacity, callback); gradient for a given opacity
3, sliding
slideDown (speed, callback); slides downward
slideUp (speed, callback); slid up
slideToggle (speed, callback); between the sliding switch
4, animation
animate({params},speed,callback);
Relative values can be used:
$ (Div) .animate ({
left:’200px’,
height: ‘+=150px’,
});
Only numeric values can create animations (such as margin: 30px), the string value can not create animations (such as background-color: red)
Animate ({}, 1000, function () {}) animation wording
Queuing: a plurality of different queues according to the animation execution sequence;
Before the stop () for an animation effect or complete stopping them;