Hack hack hack...

An open journal-- some of it written for you, but most of it is for me.


The DOM:

the web browser remembers the HTML tags, their attributes, and the order in which they appear in the file—this representation of the page is called the Document Object Model, or DOM for short. (js and jquery the missing manual, p127)

Repel - read, evaluate, print, loop

everything with remote true should have their submit button hijacked and exectured with ajax jquery is to rails what ruby is js

<source src="URL">
//To create an instance of XMLHttpRequest, simply do this:
var req = new XMLHttpRequest();

xhr- used to be just xml

READ: ajax jesse james garrett AJAX = Asynchronous JavaScript + XML Ajax incorporates: - standards-based presentation using XHTML and CSS; - dynamic display and interaction using the Document Object Model; - data interchange and manipulation using XML and XSLT; - asynchronous data retrieval using XMLHttpRequest; - and JavaScript binding everything together.

adaptive path elements of user experience

js is all an event model

predictable DOM

###Difference between li/#b and li.b?###

/# => ids –> IDs are unique - Each element can have only one ID - Each page can have only one element with that ID

dot b => class names –> are NOT unique - You can use the same class on multiple elements. - You can use multiple classes on the same element.

Crazy Selector for our app

$("tr#error_<%error.id %> input:submit[value='Noise']").click(function(){
  confirm("Are you sure?");
// input:submit[value='Noise']" are you kidding me?