Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to define paper in raphael JS liberary?
    primarykey
    data
    text
    <p>I want to learn raphael JS liberary to draw a square. I copied the official code, but it is not work, "paper is not defined on line 34". how to define it? The demo is on <code>http://www.irunmywebsite.com/raphael/additionalhelp.php</code> the left menu "animate" ,Thanks.</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt; &lt;title&gt;Raphaël · Gear&lt;/title&gt; &lt;style type="text/css"&gt; body { background: #333; color: #fff; font: 300 100.1% "Helvetica Neue", Helvetica, "Arial Unicode MS", Arial, sans-serif; } #holder { height: 480px; left: 50%; margin: -240px 0 0 -320px; position: absolute; top: 50%; width: 640px; } #copy { bottom: 0; font: 300 .7em "Helvetica Neue", Helvetica, "Arial Unicode MS", Arial, sans-serif; position: absolute; right: 1em; text-align: right; } #copy a { color: #fff; } &lt;/style&gt; &lt;script src="raphael-min.js" type="text/javascript" charset="utf-8"&gt;&lt;/script&gt; &lt;script type="text/javascript" charset="utf-8"&gt; var a = paper.circle(320, 100, 60).attr({fill:'#FF0000'}); a.animate({ 'translation': '0,300' }, 500, 'bounce'); var b = paper.circle(320, 100, 60).attr({fill:'#FFFF00'});; b.animate({ cx: 320, cy: 300 }, 500, 'bounce'); var path1=paper.path("M114 253").attr({"stroke": "#f00", "stroke-width":3}); path1.animate({path: "M114 253 L 234 253"},3000,function(){ var path2=paper.path("M234 253").attr({"stroke": "#f00","stroke-width":3}); path2.animate({path: "M234 253 L 234 134"},3000,function(){ var path3=paper.path("M234 134").attr({"stroke": "#f00","stroke-width":3}); path3.animate({path: "M234 134 L 97 134"},3000); }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="stroke"&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload