Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8780449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:03:05+00:00 2026-06-13T20:03:05+00:00

I got 2 no.of Circle, clicking big circle i am finding small circle using

  • 0

I got 2 no.of Circle, clicking big circle i am finding small circle using the class name and trying to animate the small circle, but not working at all.

But fadeId, fadeOut properites are working.

My function:

var paper = new Raphael('myPaper',500,500);
var circle = paper.circle(100,100,100).attr({'fill':'red'});
circle.node.setAttribute('class','red');
var text = paper.text(100,100,"test Text").attr({'fill':'#fff'});

var smallCircle = paper.circle(300,100,50).attr({'fill':'green'}).data('id','green');
smallCircle.node.setAttribute('class','green'); 

var newSet = paper.set();

newSet.push(circle,text);

newSet.attr({cursor:'pointer'}).data('id','oval');

$('.red').on('click',function () {   
    $('.green').animate({'cx':200},5000); //animation not working.
} )

​

jsfiddle here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T20:03:06+00:00Added an answer on June 13, 2026 at 8:03 pm

    If you want to animate using Raphael you need to get the Raphael object for the element, rather than a jQuery object. To do that you need to get the raphaelid property from the element, and then use the getById method of your canvas.

    paper.getById($('.green')[0].raphaelid).animate({'cx': 200}, 5000);
    

    If you have more than one element you can probably just loop through and animate each one.

    var anim = Raphael.animation({'cx': 200}, 5000);
    $('.green').each(function() {
        paper.getById(this.raphaelid).animate(anim);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got this circle detection working but only detects 1 circle. How would
I've got a page which uses Flash with animations (These are not crucial but
I was writing some canvas code to draw a circle, but it never got
I've got two small structural issues that I'm not sure how to handle given
I have got a small problem in an Android app I am working on
Got this error message while trying to load view: The model item passed into
I've got a circle defined by a center (x,y,z), a radius and an orientation
In similar topic I've asked if that is possible at all (http://stackoverflow.com/questions/6006364/svg-through-the-jquery-svg), but when
I got a point with latitude and longitude using decimals. The point is centered
I've got a requirement to create several shapes based on a supplied size (all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.