You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

removeClassId.js 266B

1234567891011
  1. module.exports = (el, $) => {
  2. const selectors = [ 'class', 'id' ];
  3. selectors.forEach(selector => {
  4. const attribute = $(el).attr(selector);
  5. if (typeof attribute !== 'undefined') {
  6. $(el).removeAttr(selector);
  7. }
  8. });
  9. };