i want to catch some divs in a page, at first i got all the names of them from a db, but now they are dynamicly generated.
so.. i couldnt use php anymore.. so.. this is what i came up with:
Expand|Select|Wrap|Line Numbers
- if (obj.name.match('resize'))
- {
- instance = str.replace(/resize/,"");
- elements.q+instance+.resizeTo(dd.obj.x-elements.q+instance+.x+12, ((obj.y+12)-dd.elements.q+instance+.y));
- elements.opt+instance+.moveTo(dd.obj.x-24, dd.obj.y);
- elements.movemove+instance+.moveTo(dd.obj.x-12, dd.obj.y);
- }
example:
object name is "resize1"
i strip resize
and i want to get:
elements.movemove1.moveTo(dd.obj.x-12, dd.obj.y);
you know what i mean :)