Skip to content

kreynolds/RaphaelJS-Infobox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

RaphelJS-Infobox

This is a simple JS helper that automates placement of HTML elements inside of RaphaelJS Containers. This script requires jQuery to operate though it could be modified to work without if you really wanted to.

Quick Start

var paper = Raphael("raphael-canvas", 500, 500);
var infobox = new Infobox(paper, {x:10,y:10, width:250, height:250});
infobox.div.html('<p>This is some crazy content that goes inside of that box that will wrap around.</p>');

Notes

  1. It must be loaded on document ready to account for order and scrollbars across all RaphaelJS supported browsers.

  2. Yes, you can put a youtube video in it if you want

  3. The show() and hide() methods are just examples of what you can do to couple behaviors between the HTML and the SVG element.

  4. The canvas must be invoked using a container element as above. Otherwise, jQuery will not be able to find the offsets and a TypeError will result.

About

Wrapper for placing dynamic HTML on a RaphaelJS Canvas

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published