- JQuery
- DOM Manipulation
- $('element').css('property','value') //single
- .css({property: 'value', property: 'value', ......})// multiple -> objects
- .addClass('className')//add a class (css)
- .removeClass('className)
- .click(function(){})
- .toggleClass()
- .text()
- .html()
- .append() // add at the end
- .prepend() // add at the beginning
- appendTo('')
- prepenTo('')
- .before()
- .after()
- .empty() //takes the HTML out
- .detach()
- .attr('')//The .attr() method gets the attribute value for only the first element in the matched set. To get the value for each element individually, use a looping construct such as jQuery's .each() or .map() method.
- .removeAttr()
- .wrap('')
- .wrapAll('')
- .keyup()
- Array
- $.each(arrayName, function(i,val){....})
- .toArray()
- DOM Manipulation
WDS-38_JQuery-3_jQuery_Crash_Course_3-DOM_Manipulation
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||