jsFiddle α
Share link
Share full screen result
Embed on your page (embed options)
http://mootools.net/blog/2012/07/25/javascript-challenge-1/ This week’s challenge is to find an elegant solution to generating elements in a spiral pattern. Consider the following diagram… Your solution can be procedural or recursive, but in either case you will be dealing with a shrinking grid of possible locations for elements. The colours do not have to be in the result - they are only used to indicate the pattern. Hint: Try defining variables for columns and rows so that the shape can change but the positioning and order remain the same.
Normalized CSS
Body tag
DTD XHTML 1.0 Strict XHTML 1.0 Transitional HTML 5 HTML 4.01 Strict HTML 4.01 Transitional HTML 4.01 Frameset
Framework <script> attribute
Echo apis are created to simulate Ajax calls: /echo/json/ for JSON, http://jsfiddle.net/echo/jsonp/ for JSONP, /echo/html/ for HTML and /echo/xml/ for XML.
/echo/json/
http://jsfiddle.net/echo/jsonp/
/echo/html/
/echo/xml/
Please read API documentation and follow examples.
jquery tweets, Delay, ElementStacks
twitter with dijits
Request.JSONP, Enhanced form, Request.HTML, Request.JSON, Delay, ElementStack
YUI+YQL Twitter example
Delayed Mouse Tracking
Delay
Created and maintained by Piotr and Oskar.
Hosted by DigitalOcean.
Special thanks to MooTools community.
License
All code belongs to the poster and no license is enforced.
JSFiddle or its authors are not responsible or liable for any loss or damage of any kind during the usage of provided code.
Links
Please read the documentation. For updates please follow our blog, tweets or become a fan.