Does anyone know if it’s possible to set a Raphael container by a class name rather than an id?
For example, this works:
Raphael("holder", 100, 100));
And this works:
var container = document.getElementById('holder');
Raphael(container, 100, 100));
But this doesn’t work:
var container = $('#holder');
Raphael(container, 100, 100));
And this doesn’t work:
var container = document.getElementsByClassName('holder');
Raphael(container, 100, 100));
And this definitely doesn’t work:
Raphael($('.holder:last'), 100, 100));
Raphael is playing nice with jQuery in every other part of my code except in this circumstance. I need to accomplish something like the last example. Ideas?
1 Answer