// 2 ways to write a function...
// anonymous functions vs declared functions
// the 'anonymous function' way
// do it the work right there
//
// use the anonymous function as the
// 2nd parameter to ready
ready('a',
function(e) {
j(e).css('border','1px solid red');
j(e).text("I was here");
}
);
// the declared function way
// abstract the work and let it be re-used
//
// create your own function, declare
// it elsewhere, and refer to it when
// needed
ready('a', hideHi);
function hideHi(e) {
var text = j(e).text();
if(text.contains("Hi")) {
j(e).hide();
}
}