$ npm install dom7
Dom7 - is the default DOM manipulation library built-in Framework7. It utilizes most edge and high-performance methods for DOM manipulation. You don’t need to learn something new, its usage is very simple because it has the same syntax as well known jQuery library with support of the most popular and widely used methods and jQuery-like chaining.
See Framework7 Dom7 documentation for usage examples and available methods.
Dom7 can be installed with NPM:
npm install dom7 --save
// import Dom7 and methods you need
import { $, addClass, removeClass, toggleClass, on } from 'dom7';
// install methods
$.fn.addClass = addClass;
$.fn.removeClass = removeClass;
$.fn.toggleClass = toggleClass;
$.fn.on = on;
// use
$('p').addClass('custom-paragraph');
$('p').on('click', function() {
$(this).toggleClass('custom-paragraph');
});
© 2010 - cnpmjs.org x YWFE | Home | YWFE