Frequently Asked Questions

Another JavaScript library? Really?
There is good and bad in every library, mainly brought about by the goals of their core developers. Jelo was built to meet the following needs:
  • High performance. Libraries must be fast and reliable, the whole point is to save you development time.
  • Small filesize. No bulky widgets or code you'll rarely use. This saves you bandwidth and your end users download time.
  • Throw errors when appropriate. Libraries that advertise "no errors!" can be a nightmare to debug. If you don't know what you did wrong, you can't fix it. Developers can (and should) use try / catch blocks to hide errors from end users in production, but must be able to rely on informational errors during development.
  • Work with JavaScript, not against it. Jelo makes writing cross-browser compatible JavaScript easy, but it doesn't require you to learn a completely new syntax or language. Rather than changing the way JavaScript works, Jelo uses the natural features of the language to smooth the learning curve.
How do I execute code as soon as the page is done loading?
Jelo.onReady(fn) adds a function to be executed once the page's DOM is ready. You can call Jelo.onReady more than once; each function will be executed in the order it was added.

	Jelo.onReady(function() {
		alert("the document is loaded");
	var myFunction = function() {
		alert("both functions will execute on page load");
How do I grab elements on the page?
Jelo uses the "dollar sign function", like most JavaScript libraries. $(selector) is shorthand for Jelo.Dom.selectNode, which returns the first matching element. $$(selector) (short for works the same way, but returns an array of matching elements. The selector is any valid CSS selector, for example:
  • $("img") matches the FIRST image on the page.
  • $$("img.thumbnail") matches all images with class "thumbnail".
  • $$("#navigation a") matches all links inside the element with id "navigation".
  • $("#navigation a") matches the FIRST link inside the element with id "navigation".
  • $$("input[type=text]") matches all textfields (input elements whose type attribute is "text").
Who's the author?
I'm HB Stone, a Senior Applications Developer in Palm Desert, CA. My languages of choice are JavaScript and PHP, but I'm familiar with several other web and desktop programming languages. I mostly write custom software solutions for projects such as touchscreen vending machines, multifunction ATMs, educational and commercial kiosks. I also do my fair share of graphic design, web design, web development, and SEO.