这是cropper的演示页面:https://fengyuanchen.github.i...
我想使用旋转按钮,就是下面红框中的两个:

按照文档操作https://github.com/fengyuanch...
$("#rotateLeft").cropper('rotate', -90);
$("#rotateRight").cropper('rotate', 90);
可是不能使用,浏览器提示Cannot read property 'rotate' of undefined

看了一下js源代码: https://fengyuanchen.github.i...
没看懂是怎么触发按钮的,请大神帮讲一下过程。
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
网络不好,没看全,主要在这里
反观你问题里的调用:
我觉得你是不是漏了个img,cropper应该是作用于img之类的,而不是按钮,按钮只是起到点击时执行cropper调用