Browse files

camel-cased the ejs.bodyReady method for consistency

  • Loading branch information...
1 parent 913b870 commit 9c21087124e232e926d19c94fd4e7c5486506c72 scottjehl committed Apr 18, 2012
Showing with 4 additions and 4 deletions.
  1. +2 −2 README.md
  2. +1 −1 _demo/enhance.audit.js
  3. +1 −1 enhance.js
View
4 README.md
@@ -60,9 +60,9 @@ All of the Enhance api is available via `window.ejs` or just `ejs`. From `ejs`,
});
In a pinch, `onDefine` could also be used to delay code execution until another JS file has loaded and executed.
-- `bodyready`: run a callback function when the body element is defined. Accepts one argument: a callback function to execute when the `body` element becomes defined. This is merely a shortcut to the `onDefine` example above. Example:
+- `bodyReady`: run a callback function when the body element is defined. Accepts one argument: a callback function to execute when the `body` element becomes defined. This is merely a shortcut to the `onDefine` example above. Example:
- ejs.bodyready( function(){
+ ejs.bodyReady( function(){
if( ejs.hasClass( document.body, "home" ) ){
// the body element has a class of "home"...
}
View
2 _demo/enhance.audit.js
@@ -56,7 +56,7 @@
// (beware: don't rely on loading CSS this way for styles that need to ejsly at page load or you'll get a FOUC)
// Note: since we're using hasClass to check if the body element has a class or not, we need to wrap all remaining logic in a call to ejs.isDefined
- ejs.bodyready( function(){
+ ejs.bodyReady( function(){
if( ejs.hasClass( win.document.body, "tmpl-home" ) ){
ejs.addFile( ejs.files.css.sample );
View
2 enhance.js
@@ -42,7 +42,7 @@
};
// shortcut of isDefine body-specific
- ejs.bodyready = function( callback ){
+ ejs.bodyReady = function( callback ){
ejs.onDefine( "document.body", callback );
};

0 comments on commit 9c21087

Please sign in to comment.