我正在编写一个包含SVG的PHP脚本页面。我想使用Jquery Resize功能,但是在尝试将其用于SVG内部的图像时,它并没有起作用。我已经在div上尝试过并且可以正常工作。
以下是代码:
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" width="800" height="420" id="svg">
<image height="120" width="120" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://designpieces.com/wp-content/uploads/2013/04/chrome.png" ></image></svg>
Jquery代码:
$('.resize').resizable({
ghost: true
});
$('image').resizable({
ghost: true
});