JQuery html
get
text()
,html()
,val()
,attr()
set
text("text")
,html("<p>html</p>")
,val("5")
,attr("href", "https://hellolaravel.org/")
add
methods | description |
---|---|
append() - |
Inserts content at the end of the selected elements |
prepend() - |
Inserts content at the beginning of the selected elements |
after() - |
Inserts content after the selected elements |
before() - |
Inserts content before the selected elements |
remove / empty
addClass
methods | description |
---|---|
addClass() | Adds one or more classes to the selected elements |
removeClass() | Removes one or more classes from the selected elements |
toggleClass() | Toggles between adding/removing classes from the selected elements |
css() | Sets or returns the style attribute |
dimensions
methods | description |
---|---|
width() | element height |
height() | element height |
innerWidth() | element + 2 padding |
innerHeight() | element+ 2 padding |
outerWidth() | element+ 2padding+ 2 border |
outerHeight() | element+ 2padding+ 2 border |
Powered by:
@code4mk