2021年3月11日星期四

javascript jquery rotate plugin not working

index.html

<script src="//code.jquery.com/jquery-3.3.1.min.js"></script>  <script src="/js/jQueryRotateCompressed.js"></script>  <script type="text/javascript" src="/js/Randomitem/index.js"></script>  

jQueryRotateCompressed.js Some code for the plugin.

(function (k) {    for (      var d,        f,        l = document.getElementsByTagName("head")[0].style,        h = [          "transformProperty",          "WebkitTransform",          "OTransform",          "msTransform",          "MozTransform",        ],        g = 0;      g < h.length;      g++    )      void 0 !== l[h[g]] && (d = h[g]);    d &&      ((f = d.replace(/[tT]ransform/, "TransformOrigin")),      "T" == f[0] && (f[0] = "t"));    eval('IE = "v"=="\v"');    jQuery.fn.extend({      rotate: function (a) {        if (0 !== this.length && "undefined" != typeof a) {          "number" == typeof a && (a = { angle: a });          for (var b = [], c = 0, d = this.length; c < d; c++) {            var e = this.get(c);            if (e.Wilq32 && e.Wilq32.PhotoEffect)              e.Wilq32.PhotoEffect._handleRotation(a);            else {              var f = k.extend(!0, {}, a),                e = new Wilq32.PhotoEffect(e, f)._rootObj;              b.push(k(e));            }          }          return b;        }      },  

js/Randomitem/index.js

  $('#capsule'+i).rotate({                  duration:1280*i,                  angle: 0,                   animateTo:880              });  

Error message $(...).rotate is not a function I think I applied the plug-in normally. But why do they say rotate doesn't exist? Help me!

https://stackoverflow.com/questions/66593483/javascript-jquery-rotate-plugin-not-working March 12, 2021 at 10:48AM

没有评论:

发表评论