Добрый вечер! Сейчас попытаюсь объяснить свою проблему. У меня есть SVG код такого вида:
<!--?xml version="1.0" encoding="UTF-8" standalone="no"?-->
<svg version="1.1" baseProfile="full" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" width="93mm" height="53mm">
<color-profile name="acmecmyk" href="http://printers.example.com/acmecorp/model1234"></color-profile>
<rect x="0" y="0" width="93mm" height="53mm" stroke="black" stroke-width="2px" fill="white"></rect>
<g id="square">
<rect x="0" y="0" width="100" height="100" fill="blue" stroke="red" stroke-width="5px" rx="8" ry="8" id="myRect" class="chart"></rect>
</g>
<use href="#square" transform="scale(2)"></use>
<text x="20" y="55" font-family="Verdana" font-size="43pt" id="hello">Hello World!</text>
<text x="100" y="100" font-family="Arial" font-size="25px" fill="#FF0000">Кукарамба</text>
</svg>
Задача состоит в том, чтобы любые элементы нарисованные на холсте SVG можно было перемещать с помощью мыши. Я нашел подобное решение на JavaScript - ТУТ, но хочу реализовать на jQuery. Помогите, если Вам не трудно. И еще вопрос - обязательно ли нужно код JavaScript или jQuery оборачивать в CDATA?
Raphael.js
сделан специально, чтобы упростить работу с SVG, а jQuery оставьте манипуляции с DOM – Spectre 9 авг '12 в 18:02