Menu

gitpiper

jQuery Cheat Sheet in April 2024

Last Updated: 22 April 2024

README.md

Traversing

$('.box')
  .children()
  .closest('div')
  .filter(':selected')
  .find('div')
  .has('div')
  .first()
  .next('div')
  .nextUntil('div')

Advanced features

Extending selectors

$.expr[':'].inline = function (el) {
  return $(el).css('display') === 'inline'
}

Enables $(':inline')

Extend CSS properties

$.cssHooks.someCSSProp = {
  get: function (elem, computed, extra) {
  },
  set: function (elem, value) {
  }
}

// Disable "px"
$.cssNumber["someCSSProp"] = true

fn.animate() hooks

$.fn.step.someWhatever = function(fx) {
  // ...
}

338+ more cheat sheets for you in April 2024

Subscribe to our Newsletter

Subscribe to get resources directly to your inbox. You won't receive any spam! ✌️

© 2024 GitPiper. All rights reserved

Rackpiper Technology Inc

Company

About UsBlogContact

Subscribe to our Newsletter

Subscribe to get resources directly to your inbox. You won't receive any spam! ✌️