Racoon200
05-02-2007, 07:08 PM
Could someone correct this script for me? I did it, but iam no good at javascript. I also need you to make the var shadow be an img ill make, and that a shadow is created for each objects (the script must count how many objects with shadow class exist, and make that amount of shadows, also each shadow must be positioned below the respective Obj
// Shadow engine
function applyShadow()
{
// count how many obj's
var i = countElementsByClass('shadow')
var shadow = (img that ill use, a png)
(create i shadow)
// Get element to shadow
var Obj = getElementByClass('shadow')
// Get element's properties
shadow.style.width = Obj.style.width
shadow.style.width = Obj.style.width
shadow.style.top = (Obj.style.top - 5)
shadow.style.left = (Obj.style.left - 5)
Or simply provide with a code that will give a fade out shadow automatically to all the elements with shadow class
// Shadow engine
function applyShadow()
{
// count how many obj's
var i = countElementsByClass('shadow')
var shadow = (img that ill use, a png)
(create i shadow)
// Get element to shadow
var Obj = getElementByClass('shadow')
// Get element's properties
shadow.style.width = Obj.style.width
shadow.style.width = Obj.style.width
shadow.style.top = (Obj.style.top - 5)
shadow.style.left = (Obj.style.left - 5)
Or simply provide with a code that will give a fade out shadow automatically to all the elements with shadow class