SomeKittens
SomeKittens

Reputation: 39522

Draw lines on HTML page from one div to another

I want to be able to draw lines on a webpage from one div to another. I've looked around, but all I've seen are hacks that rotate webkit images like this one. Raphel.js is another possiblity, but I'd prefer to avoid importing an entire library if I can. I also need to make sure it works in all browsers.

Is this possible, or am I off my rocker?

UPDATE: I tried Raphael, no dice. Creating the object overwrites what I currently have. Code (In case I did something wrong):

window.onload = function() {
        var paper = new Raphael(document.getElementById('image'), 1024, 768);/*
        var line = paper.path("M 250 250 l 0 -50 l -50 0 l 0 -50 l -50 0 l 0 50 l -50 0 l 0 50 z");
    };

Upvotes: 1

Views: 3087

Answers (1)

SomeKittens
SomeKittens

Reputation: 39522

While I could not find a way to do this without a framework, I did find a cross-browser solution in jsPlumb. (Thanks to jeffery_the_wind)

Upvotes: 2

Related Questions