> The special class selector exists for HTML only. In XML such as SVG an
> attribute with the name "class" is just an attribute as every other
> attribute and there's no such special selector.

Oh, ok, thanks for the tip.

> Try: $('[EMAIL PROTECTED]"jtip"]')

It does not seem to work.
However, the syntax works for id attributes...

Here is a short SVG sample

With 'function test_init(){ $('[EMAIL PROTECTED]"jtip"]') ...', alert
message never shows up when I move the mouse cursor over the circles.
However, if I replace the selector with $('[EMAIL PROTECTED]"rev11"]') ...,
alert message shows up whenever I move the mouse cursor over the first
circle.

Any idea about what I'm doing wrong?

Thanks a lot,
Manu


<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd ">
<svg width="100%" viewBox="0 0 574.0 596.0 " height="100%"
xmlns="http://www.w3.org/2000/svg";
xmlns:xlink="http://www.w3.org/1999/xlink"; onload="JT_init()">
  <script type="text/javascript" xlink:href="jquery.js"/>
  <script type="text/javascript">
  $(document).ready(test_init);

  function test_init(){
      $('[EMAIL PROTECTED]"rev11"]')
      .hover(function() {alert('HERE')})
        .click(function(){return false});
  }
  </script>
        <circle id="rev11" class="jtip" stroke-width="3" stroke="#8a8a8a"
cy="75.0" cx="100" r="29.0" fill="#cfcfcf"/>
        <circle id="rev12" class="jtip" stroke-width="3" stroke="#8a8a8a"
cy="150.0" cx="100" r="29.0" fill="#cfcfcf"/>
</svg>


-- 
Manu

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to