1) CODE TITLE: Image Warper
2) AUTHOR NAME/NOTES: Michael Burt
3) DESCRIPTION: Visually warps the image specified. Instructions on how to use are on the page below.
4) URL TO CODE: http://www40.brinkster.com/mburt/scripts/warp_image.htm
Printable View
1) CODE TITLE: Image Warper
2) AUTHOR NAME/NOTES: Michael Burt
3) DESCRIPTION: Visually warps the image specified. Instructions on how to use are on the page below.
4) URL TO CODE: http://www40.brinkster.com/mburt/scripts/warp_image.htm
Couple questions, why are you using eval? and what is the point of the new keyword?
Answers, could be wrong but it's a guess:To prevent the numbers being concatenated as a string. This isn't necessary, remove "eval" and simply use the brackets to make sure the addition is processed before the concatenation.Quote:
why are you using eval?
There is no point, here. mburt, new is only useful if you intend to assign properties to the created object.Quote:
and what is the point of the new keyword?
Also, flexibility could be improved by using position: relative; rather than position: fixed;.
Thanks Twey I'll look into those measures.
Oops!!
I forgot to take out the "new". I was going to make the images elements, and assign properties through the new function, but I changed my mind and forgot to take it out :)
blm126: If you said 1 + i, without brackets or eval, the string would literally be 1 than whatever variable i was.
Ex:
If I is one:
11
If I is two:
12
etc.
It wouldn't actually add the string, which in this case is what I want to do :)
yes, I know that. but what I didn't get is why you were using eval instead of brackets
I dunno. I felt like it :p