Category Archives: javascript

HTML5 canvas Mandelbrot

I would like to create an animated Mandelbrot visualization using JavaScript on an HTML5 <canvas> element. The Mandelbrot set, popularized by BenoĆ®t Mandelbrot, is the set of complex numbers that remain bounded under the function zn+1 = zn2 + c. … Continue reading

Posted in html, javascript | Leave a comment

javascript keyboard buffer, part 4

Previously, we created a JavaScript keyboard buffer that can edit text in a static html page as well as play back each key as it was typed. I would like to combine all of this into a single JavaScript include … Continue reading

Posted in css, html, javascript, software architecture | Leave a comment

javascript keyboard buffer, part 3

Previously, we created a javascript keyboard buffer that can edit text in a static html page. Using those functions I'd like to add a buffer replay. I would like to add an onclick event to a specified div such that … Continue reading

Posted in javascript | Leave a comment

javascript keyboard buffer, part 2

Previously, we created a javascript keyboard buffer and next I'd like to process that buffer to edit text in a static html page. Given the following simple html: <div id="keyboardBufferTest"> Spam and eggs </div> I would like the keyboard buffer … Continue reading

Posted in javascript | Leave a comment

javascript keyboard buffer, part 1

I would like to capture keystrokes in JavaScript, save them to a buffer, and play them back exactly as they were typed. There are three onkey events that can be assigned event handlers, these are, document.onkeydown = eventHandler document.onkeypress = … Continue reading

Posted in javascript | Leave a comment

javascript prototype

I would to extend the functionality of a JavaScript class, for example, to add utility functions to a specific Object. Object.prototype The prototype property can be used to add new properties and functions to any object, including built-in objects. For … Continue reading

Posted in javascript | Leave a comment

css opacity in javascript

I want register JavaScript events to toggle CSS opacity on selectable images. For example, given a div with a list of images like the following, <div id="foo_images"> <img src="foo.jpg" /> <img src="bar.jpg" /> <img src="baz.jpg" /> ... </div> I would … Continue reading

Posted in css, html, javascript, software architecture | Leave a comment