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 8138889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:38:50+00:00 2026-06-06T11:38:50+00:00

I am new to Raphael and am trying to do something very simple, but

  • 0

I am new to Raphael and am trying to do something very simple, but failing miserably.

I am trying to replicate the animation at this link This is the code I have so far:

<html>
<head><title></title>
<script src="raphael-min.js"></script>
<script src=" src="jquery-1.7.2.js"></script>
</head>

<body>

<div id="draw-here-raphael" style="height: 200px; width: 400px; background: #666;">
</div>

<script type="text/javascript">
//all your javascript goes here

var r = new Raphael("draw-here-raphael", 400, 200),

    // Store where the box is
    position = 'left',

    // Make our pink rectangle
    rect = r.rect(20, 20, 50, 50).attr({"fill": "#fbb"});

// Note JQuery is adding the mouseover. SVG == html nodes
$(rect.node).mouseover(function () {
  if (position === 'left') {
    rect.animate({x: 300, y: 100}, 400, "<>");
    position = 'right';
  } else {
    rect.animate({x: 20, y: 20 }, 800, "bounce");
    position = 'left';
  }
});
// Make that sucker rotate
setInterval(function () {
  rect.rotate(1);
}, 10);

</script>

</body>
</html>

I have downloaded jquery and have it in the same folder as the Raphael. The code that isn’t working is the commented code talking about jquery adding the mouseover. When I add that code the rectangle doesn’t rotate anymore. It is just stationary. If someone can please help me with this animation I would appreciate it.

Thanks

  • 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-06T11:38:51+00:00Added an answer on June 6, 2026 at 11:38 am

    You have an error in your code:

    <script src=" src="jquery-1.7.2.js"></script>
    

    Change it to:

    <script src="jquery-1.7.2.js"></script>
    

    That should correct your problem with jQuery.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to Raphael and am trying to do something very simple, but
. I am very new to raphael.js.I have done a europe map using t.I'm
I have this piece of code ( on jsfiddle ) var paper = new
I'm trying to adapt some code from a simple app that uses Raphael to
Very new to using Raphael.js I'm looking at the tutorials and I am able
New to PHP and MySQL, have heard amazing things about this website from Leo
new to c#. I'm trying to make a simple system where I can search
So the short version, what I don't understand is this line of code: (new
I'm new to javascript and I am looking through some Raphael demo code. I'm
First off, fairly new to JS but getting better :-) This question is similar

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.