openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

jquery-plugin-toggleAttr.min.js (226B)


      1 import $ from "../jquery-global.min.js";
      2 export default function(attr, attr1, attr2) {
      3 return this.each(function() {
      4 let self = $(this);
      5 if (self.attr(attr) == attr1)
      6 self.attr(attr, attr2);
      7 else
      8 self.attr(attr, attr1);
      9 });
     10 };