function remove_jquery_migrate( $scripts ) { if ( ! is_admin() && isset( $scripts->registered['jquery'] ) ) { $script = $scripts->registered['jquery']; if ( $script->deps ) { $script->deps = array_diff( $script->deps, array( 'jquery-migrate' ) ); } } } add_action( 'wp_default_scripts', 'remove_jquery_migrate' );
Tag: js
Corset – Cascading binding sheets
Reactive UI without the complexity of SPA frameworks. Use any backend you like; bind to the HTML you already produced.
Bring your HTML to life.
Corset binds JavaScript to HTML. It doesn’t matter how the HTML is produced and Corset doesn’t need to own your templating choice. Instead it uses a CSS-like syntax to enhance whatever you give it.
HTML
<div class="counter">
<button
type="button"
class="increment">Increment</button>
<button
type="button"
class="decrement"
disabled>Decrement</button>
<div
class="result">
Count: <strong class="count">0</strong>
</div>
</div>
JavaScript with Corset
import sheet, { mount } from 'https://cdn.corset.dev/v1';
mount(document, class {
count = 0;
bind() {
const { count } = this;
return sheet`
.counter {
--count: ${count};
--inc: ${() => this.count = count + 1};
--dec: ${() => this.count = count - 1};
}
.count {
text: var(--count);
}
.increment {
event[click]: var(--inc);
}
.decrement {
attr-toggle[disabled]: ${count === 0};
event[click]: var(--dec);
}
`;
}
});
Swiper – The Most Modern Mobile Touch Slider
Swiper is the most modern free mobile touch slider with hardware accelerated transitions and amazing native behavior. It is intended to be used in mobile websites, mobile web apps, and mobile native/hybrid apps.
Swiper is not compatible with all platforms, it is a modern touch slider which is focused only on modern apps/platforms to bring the best experience and simplicity.
Swiper, along with other great components, is a part of Framework7 – a fully-featured framework for building iOS & Android apps. Swiper is also a default slider component in the Ionic Framework.
Read MoreA11y Dialog – lightweight dialog windows
https://github.com/KittyGiraudel/a11y-dialog
Installation
Using a bundler (recommended):
If you’re using a bundler (such as Webpack or Rollup), you can install a11y-dialog
through npm or yarn like any other dependency:
npm install a11y-dialog
yarn add a11y-dialog
Read More
Inclusive components
https://inclusive-components.design/
Because the web is full of interfaces which don’t consider the diversity of abilities, circumstances, and preferences of their users.
Read MoreAdd-to-Calendar Button
A convenient JavaScript snippet, which lets you create beautiful buttons, where people can add events to their calendars.
Very customizable