Skip to content

Divide Me

Interactive Prototype:


Idea – To create a full screen web page that divided into equal squares every time you clicked on one.

Purpose – You can create art or abstractly plan out visual spacing, but there is no real world application at this point.

Resources – HTML, CSS, jQuery

Roadblocks – I had difficulty adding an event handler on dynamically created elements. At first, I targeted specifically the newly created divs, but the issue was that the handlers only attached onto what was already created on initial load. I learned to attach it onto an element that was always present and to target the class I was looking for by using the ‘on’ event.


$(document).on('click', '.start', function(){
	...
});

Next – Add a tool selector to choose between a ‘paint’ or ‘divide’ tool, where the paint tool will allow you to change the colour of squares instead of divide them.


Comments are closed.