Thursday 15 April 2010

html - Javascript Modules/Decoupling with DOM elements -



html - Javascript Modules/Decoupling with DOM elements -

i'm working on parts of big javascript application deals lot dom elements. wanted start making modules/start decoupling of code. found decent examples 1 of things can't figure out how create dom elements , interact them? should javascript responsible creating dom elements or should javascript take in reference dom elements or should javascript assume elements there?

any help on appreciated , if i'm wrong in anyway i'd appreciate corrections :)

it's smart check if dom elements there before seek interact them. whether create them using js or reference them situation:

if dom elements there, can reference them (after having created them html or php). but if need create dom elements on fly, when criteria met, can utilize js create them.

to sure best approach be, we'd have familiair specifics of situation.

javascript html dom

No comments:

Post a Comment