Loading ...
Sorry, an error occurred while loading the content.
 

Re: [svg-developers] SVG and jQuery

Expand Messages
  • Robin Berjon
    ... What do you mean by full support ? As far as I know, jQuery works fine with SVG. -- Robin Berjon - http://berjon.com/ Feel like hiring me? Go to
    Message 1 of 6 , Feb 2, 2009
      On Feb 2, 2009, at 14:31 , narendra sisodiya wrote:
      > Do any body have idea for "full support" for jQuery for svg
      > documents ? What
      > are the challenges for this.

      What do you mean by "full support"? As far as I know, jQuery works
      fine with SVG.

      --
      Robin Berjon - http://berjon.com/
      Feel like hiring me? Go to http://robineko.com/
    • Helder Magalhães
      ... Do you mean the jquery SVG plugin [1]? Have no experience with it, but it sounds like it isn t straightforward to put into action [2]... Not sure about
      Message 2 of 6 , Feb 2, 2009
        > Do any body have idea for "full support" for jQuery for svg documents ?

        Do you mean the jquery SVG plugin [1]? Have no experience with it, but
        it sounds like it isn't straightforward to put into action [2]...

        Not sure about that "full support" though - please clear the context a
        bit in order to get more valuable feedback, if the pointers aren't
        enough, naturally. ;-)

        Hope this helps,

        Helder Magalhães

        [1] http://plugins.jquery.com/project/svg
        [2]
        http://clindsey.blogspot.com/2007/12/jquery-svg-plugin-demonstrated.html
      • narendra sisodiya
        I have already used jquery svg plugin , http://plugins.jquery.com/project/svg actually, I have consulted with author of that plugin also, he repiled .. *On
        Message 3 of 6 , Feb 2, 2009
          I have already used jquery svg plugin ,
          http://plugins.jquery.com/project/svg
          actually, I have consulted with author of that plugin also, he repiled ..

          *On Mon, Feb 2, 2009 at 3:17 PM, Keith Wood
          <kbwood@...>wrote:
          Hi Narendra

          You can use some jQuery constructs within an SVG document, but not all.
          jQuery is designed to work with the HTML DOM, which is different from the
          SVG DOM. You can get the element initially from its construction or via the
          getElementById function:

          var svg = $('container').svg('get');
          var circle = svg.circle(50, 50, 20);
          $(circle).attr('r', 10);
          var elem = svg.getElementById('rect1');
          $(elem)...*

          Actually I want to full selector support for SVG DOM.
          for example,
          $("circle").attr("r" , 50 ) ;
          should set all circle of svg to radius equal to 50.
          so that in svg ecmascript, I want to use $(g .myclass #mainbox).hide() and
          so on


          so is it possible to port the jquery for SVG DOM. because svg do support
          ECMAScript, so full support of jquery for svg is technically possible
          project.
          what do you think about full support. Actually I want full support of jquery
          for svg but I am unable to get technical difficulties behind it.


          [Non-text portions of this message have been removed]
        • Felipe Sanches
          I once tryied unsucsessfully to use animation features from jquery to animate SVG. Yes I know that SVG has its own animation support, But I would like to be
          Message 4 of 6 , Feb 2, 2009
            I once tryied unsucsessfully to use animation features from jquery to
            animate SVG. Yes I know that SVG has its own animation support, But I would
            like to be able to also use jquery syntax with selectors, etc...

            On Mon, Feb 2, 2009 at 4:19 PM, narendra sisodiya <
            narendra.sisodiya@...> wrote:

            > I have already used jquery svg plugin ,
            >
            > http://plugins.jquery.com/project/svg
            > actually, I have consulted with author of that plugin also, he repiled ..
            >
            > *On Mon, Feb 2, 2009 at 3:17 PM, Keith Wood
            > <kbwood@... <kbwood%40virginbroadband.com.au>>wrote:
            > Hi Narendra
            >
            > You can use some jQuery constructs within an SVG document, but not all.
            > jQuery is designed to work with the HTML DOM, which is different from the
            > SVG DOM. You can get the element initially from its construction or via the
            > getElementById function:
            >
            > var svg = $('container').svg('get');
            > var circle = svg.circle(50, 50, 20);
            > $(circle).attr('r', 10);
            > var elem = svg.getElementById('rect1');
            > $(elem)...*
            >
            > Actually I want to full selector support for SVG DOM.
            > for example,
            > $("circle").attr("r" , 50 ) ;
            > should set all circle of svg to radius equal to 50.
            > so that in svg ecmascript, I want to use $(g .myclass #mainbox).hide() and
            > so on
            >
            > so is it possible to port the jquery for SVG DOM. because svg do support
            > ECMAScript, so full support of jquery for svg is technically possible
            > project.
            > what do you think about full support. Actually I want full support of
            > jquery
            > for svg but I am unable to get technical difficulties behind it.
            >
            > [Non-text portions of this message have been removed]
            >
            >
            >


            [Non-text portions of this message have been removed]
          • Erik Dahlström
            ... jQuery is indeed quite html-centric, so to use it either you need to have an html document as the main document, or you need to modify the jQuery source. A
            Message 5 of 6 , Feb 3, 2009
              On Tue, 03 Feb 2009 04:00:00 +0100, Felipe Sanches <felipe.sanches@...> wrote:

              > I once tryied unsucsessfully to use animation features from jquery to
              > animate SVG. Yes I know that SVG has its own animation support, But I would
              > like to be able to also use jquery syntax with selectors, etc...

              jQuery is indeed quite html-centric, so to use it either you need to have an html document as the main document, or you need to modify the jQuery source.

              A quick hack of the jquery source to allow it to work on standalone SVG documents, (and which have no guarantees of being fully tested or even remotely correct can be found here):

              http://xn--dahlstrm-t4a.net/svg/jquery

              This simple animation worked fine in Opera, Firefox and Safari.

              Cheers
              /Erik

              --
              Erik Dahlstrom, Core Technology Developer, Opera Software
              Co-Chair, W3C SVG Working Group
              Personal blog: http://my.opera.com/macdev_ed
            Your message has been successfully submitted and would be delivered to recipients shortly.