Skip to content

joeyjmorales/squares.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 

Repository files navigation

SquaresJS

Easily create HTML elements via Javascript

HTML tags (div, img, form, input, textarea, iframe etc) are valuable for creating HTML documents, MVC view templates which nicely facilitate designer/developer handoff. While HTML tags are useful, it is often easier to code an HTML element using pure javascript.

SquaresJS simplifies the way you think about HTML documents considering they are simply a bunch squares nested inside of other squares (ok, they are actually rectangles).

An <img> is a rectangle
A <div> is a rectangle
A <form> is a rectangle
An <input> is a rectangle
An <iframe> is a rectangle

A Web page or a dynamic javascript control is simply nested rectangles with fancy stuff like styles, rounded corners, or animation.

SquaresJS makes it easy to programatically create and nest rectangles using javascript. This is useful in creating dynamic, motion packed controls (think spin.js) or embedded in javascript frameworks (like a custom angular.js directive).

Why does this help with dynamic, animated controls?
Once you have created your nested rectangular masterpiece, SquaresJS helps keep code handles and scope on all rectangular building blocks so you can dynamically move, resize, restyle, hide or show them without the overhead of dom selectors.

TODO: FUNCTION PARAMETER DEFINITION

TODO: GIST OR PLUNKR HELLO WORLD EXAMPLE

About

Easily create HTML objects via Javascript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published