Skip to content

Latest commit

 

History

History
121 lines (84 loc) · 1.4 KB

jquery-method-equivalents.md

File metadata and controls

121 lines (84 loc) · 1.4 KB

addClass(class)

element.classList.add('class')

append(HTMLElement)

element.appendChild(HTMLElement)

appendTo(HTMLElement)

element.appendChild(HTMLElement)

closest(selector)

targetElement.closest(selectors)

css({ left: leftValue, top: topValue })

element.style.left
element.style.top

empty()

element.innerHTML = ''

fadeOut(speed)

.visible
{
    visibility: visible;
    opacity: 1;
    transition: opacity 2s linear;
}                

.hidden
{
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 2s, opacity 2s linear;
}

find(selector)

element.querySelector(selector)

height()

element.offsetHeight

height(value)

element.style.height = value

hide()

element.style.visibility = "hidden"

on(event, func)

element.addEventListener('event', function)

remove()

https://developer.mozilla.org/en-US/docs/Web/API/ChildNode/remove

removeClass(class)

element.classList.remove('class')

show()

element.style.visibility = "visible"

toggleClass(class)

element.classList.toggle('class')

width()

element.offsetWidth

width(value)

element.style.width = value