87,921
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script type="text/javascript" src="js/jquery-2.1.4.min.js"></script>
</head>
<body>
<svg>
<defs>
<symbol>
<symbol id="GroundDisconnector:jddz@0" viewBox="0 0 16 32" preserveAspectRatio="none">
<line fill="#0000FF" stroke="#9E9E9E" stroke-width="1" stroke-opacity="1" x1="7" y1="29" x2="9" y2="29" />
<line fill="#0000FF" stroke="#9E9E9E" stroke-width="2" stroke-opacity="1" x1="8" y1="0" x2="8" y2="3" />
<ellipse fill="none" stroke="#9E9E9E" stroke-width="1" stroke-opacity="1" cx="8" cy="16" rx="2" ry="2" />
<line fill="#0000FF" stroke="#9E9E9E" stroke-width="1" stroke-opacity="1" x1="4" y1="3" x2="12" y2="3" />
<line fill="#0000FF" stroke="#9E9E9E" stroke-width="2" stroke-opacity="1" x1="1" y1="7" x2="7.5625" y2="14.125" />
<line fill="#0000FF" stroke="#9E9E9E" stroke-width="2" stroke-opacity="1" x1="8" y1="18" x2="8" y2="23" />
<line fill="#0000FF" stroke="#9E9E9E" stroke-width="1" stroke-opacity="1" x1="2" y1="23" x2="14" y2="23" />
<line fill="#0000FF" stroke="#9E9E9E" stroke-width="1" stroke-opacity="1" x1="5" y1="26" x2="11" y2="26" />
<rect x="0" y="0" width="16" height="32" fill="#FFFFFF" opacity="0" />
</symbol>
<symbol id="GroundDisconnector:jddz@1" viewBox="0 0 16 32" preserveAspectRatio="none">
<line fill="#0000FF" stroke="#C8C8C8" stroke-width="1" stroke-opacity="1" x1="7" y1="29" x2="9" y2="29" />
<line fill="#0000FF" stroke="#FF0000" stroke-width="2" stroke-opacity="1" x1="8" y1="0" x2="8" y2="14" />
<ellipse fill="none" stroke="#FF0000" stroke-width="1" stroke-opacity="1" cx="8" cy="16" rx="2" ry="2" />
<line fill="#0000FF" stroke="#FF0000" stroke-width="1" stroke-opacity="1" x1="4" y1="3" x2="12" y2="3" />
<line fill="#0000FF" stroke="#FF0000" stroke-width="2" stroke-opacity="1" x1="8" y1="18" x2="8" y2="23" />
<line fill="#0000FF" stroke="#C8C8C8" stroke-width="1" stroke-opacity="1" x1="5" y1="26" x2="11" y2="26" />
<line fill="#0000FF" stroke="#C8C8C8" stroke-width="1" stroke-opacity="1" x1="2" y1="23" x2="14" y2="23" />
<rect x="0" y="0" width="16" height="32" fill="#FFFFFF" opacity="0" />
</symbol>
</symbol>
</defs>
<g id="GroundDisconnectorClass">
<rect x="0" y="0" width="16" height="32" fill="Black" />
<g id="5">
<use x="0" y="0" width="16" height="32" xlink:href="#GroundDisconnector:jddz@0" class="KV220" />
<UT.shapedata>
<ShapeRef TextID="2308" />
<CN_Ref PinNum="1" ObjectID="10_0" />
<PowerData StationName="" PointName="2211-37" Description="220kV 2211-37接地刀闸" />
</UT.shapedata>
</g>
</g>
</svg>
<script>
$("#5").click(function(e) {
currentId = $(this).attr("id");
var href = $("#" + currentId).children("use").attr("xlink:href");
var value = href.split("@")[1];
var newValue = value == "1" ? "0" : "1";
$("#" + currentId).children('use').attr('xlink:href', href.split("@")[0] + "@" + newValue);
});
</script>
</body>
</html>