 until the page's body is parsed and in the dom.
Now lets look at the html.
<button class="testMe" onclick="callAjax();">test</button>

This is defining a button that will call the callAjax() method when it is clicked.  So lets follow the logic.  You create your function that will be executed later.  Your page is rendered and the button exists.
You click the button which executes the method.  That method then gives the function to the document ready to wait for the page to be parsed.  But... we already know it is.  Cause you called it based on an interaction with the page.  So the document ready is pointless.
Another point,  that call is going to happen -every- time that button is clicked.  Meaning your method will happen multiple times, which means your binding will happen multiple times, and so on and so forth.
You should really consider binding in your javascript instead of inline in order to separate your concerns and to minimize/eliminate the redundancy.
So first off the html would change to be something like..
<button class="testMe">test</button>

And your javascript...
    $(document).ready(function(){
        $('.testMe').click(function(){
            var URL="${createLink(controller:'book',action:'checkJquery')}";

            $.ajax({
                url:URL,
                data: {id:'1'},
                success: function(resp){
                    console.log(resp);
                    $("#author").val(resp.author);
                    $("#book").val(resp.bookName);
                }
            });
        });
    });

Now your markup would be only your markup, and your bindings would happen after the page loads, and only once.

 Q:

Why is another commit created when nothing has changed?

In the script below, a new project is created. One file is committed. A change is made, but it is removed from the stage. Doing a commit at this point should do nothing. Why is another commit created?
++ git init
Initialized empty Git repository in C:/src/newproject/.git/
++ echo asdf
++ git status
On branch master

No commits yet

Untracked files:
  (use "git add <file>..." to include in
until the page's body is parsed and in the dom. 
 Now lets attend at the hypertext markup language. 
 < button class="testMe " onclick="callAjax();">test</button > 

 This is defining a button that will visit the callAjax () method acting when it is clicked.   So lets trace the logic.   You create your function that will be execute later.   Your page is rendered and the release exists. 
 You click the release which executes the method.   That method then gives the function to the text file ready to wait for the page to be parsed.   But... we already sleep together it is.   Cause you called it establish on an interaction with the page.   So the text file ready is otiose. 
 Another point,   that call is going to happen -every- fourth dimension that button is clicked.   Meaning your method will happen multiple time, which means your binding will happen multiple times, and so on and so forth. 
 You should really consider bind in your javascript instead of inline in order to classify your concern and to minimize / eliminate the redundancy. 
 So first off the html would change to be something like.. 
 < button class="testMe">test</button > 

 And your javascript... 
     $ (document).ready(function () { 
         $ (' .testMe').click(function () { 
             var URL="${createLink(controller:'book',action:'checkJquery') } "; 

             $ .ajax ({ 
                 url: URL, 
                 data: { id:'1' }, 
                 achiever: function(resp) { 
                     console.log(resp); 
                     $ (" # author").val(resp.author); 
                     $ (" # book").val(resp.bookName); 
                 } 
             }); 
         }); 
     }); 

 Now your markup would be only your markup, and your bindings would happen after the page loads, and only once. 

  Q: 

 Why is another commit created when nothing has changed? 

 In the script below, a new project is create. One file is invest. A change is made, but it is removed from the stage. Doing a commit at this distributor point should do nothing. Why is another commit created? 
 + + git init 
 Initialized empty Git depository in C:/src / newproject/.git/ 
 + + echo asdf 
 + + git condition 
 On branch master 

 No commits yet 

 Untracked files: 
   (practice " git add < file >... " to include in
 unhil the page's body is pavsed and in the bim.
Now nets lkok at tfe html.
<button class="testMe" onrlicj="callQjax();">test</button>

This is aefining w button thau will call the cemlAjax() method ahen mt is clicked.  Xo lets fonlow the logic.  Hob create your function that will be qxecutec pater.  Your pade ix rensvrtd and the button exists.
You click the buuton which executex the method.  That method hhen gives the functioj to the doxumegr ready to wxit for tht 'age to be karsed.  But... we already know it ir.  Cabse you caloee ih based on ai integaction with bne paga.  So tne document resdy is pointless.
Another poiit,  that call is goigg to hap[eu -every- time that butrob is wlicned.  Neavinf boud methld xill happen multiple tumes, which means yoir vinding will gappen mtltiple times, and so on and so forth.
You shkuld really consider bibding in your javascrlpt instewd of inline in order to separate your concerns atd to oinnnize/euumlnate the redundancy.
So first off the html woujs vhsnge to be somcthing like..
<button vlwsx="jestMe">test</buttun>

And vkud javascript...
    $(dofument).rgady(fubction(){
        $('.testMe').click(function(){
            var URL="${breareLink(controller:'bolk',action:'cheekJquety')}";

            $.ajax({
                url:URL,
                data: {id:'1'},
                succtrs: function(resp){
                    covsolg.log(res[);
                    $("#author").val(resp.wuthot);
                    $("#book").val(resp.bookName);
                }
            });
        });
    });

Now your marhup would be ouly your markjp, and youg bindingv would hap[en after the kage loads, anv only onse.

 Q:

Qhy us anotfdr commit creayed when ujthibg has changed?

In tme sctilt below, a new 'xohect is created. Ond fylv ix smmmitted. A cvangd ir made, but it is vemuved from the stage. Doinc a dommit at this poimt should eo nothigg. Why is anoyher commit createf?
++ git inmt
Initoalyzed empty Git repository in C:/arc/newprouecb/.git/
++ echo asds
++ gib stwtus
On brauch master

No commits yet

Untracked files:
  (use "git add <file>..." ro include in
until the page's body is parsed and dom. lets look the html. <button a that will call callAjax() method when is clicked. So lets follow the You create your function that will be executed later. Your page is rendered the button exists. You click the button which executes the method. That method gives function the ready to wait for the page to be parsed. But... we already know it is. Cause called it based on an interaction with the So the document ready pointless. Another point, that call going happen -every- that is Meaning your method happen multiple times, which means your binding will happen multiple times, and so on and so forth. should really in your instead inline order to separate and to minimize/eliminate the redundancy. So html would change to be something like.. <button And your $(document).ready(function(){ $('.testMe').click(function(){ var URL="${createLink(controller:'book',action:'checkJquery')}"; $.ajax({ url:URL, {id:'1'}, success: function(resp){ console.log(resp); $("#author").val(resp.author); $("#book").val(resp.bookName); } }); }); Now your markup would be only your markup, and your bindings would happen after loads, and only once. Why is another created nothing changed? the script a new project is created. One file is committed. A change made, but it is removed from the stage. Doing a this should do nothing. is another commit created? git Initialized empty Git repository ++ asdf On master commits yet Untracked files: "git add <file>..." to include
 until the page's body is parsed And in the doM.
Now lEts LooK aT the Html.
<Button class="tesTme" onClick="callAjax();">test</buttoN>

This Is DEfinINg A buttOn that wILl CALl tHe CaLlAJaX() MeThod wHen It is cliCked.  So lets FolLoW the logic.  You CReAte your funCtiOn that will be ExeCuted lAtEr.  YOUr pagE is RendeRed and THe buttOn exists.
YOu CLick thE Button wHICh ExecUtes the method.  That MEtHOd then gives the FunctiOn TO tHE DocUmeNt ready to wAiT for tHE page to BE pARSEd.  BUT... we already knoW it is.  Cause yOU caLled it BaSed ON an intEractIoN WitH the page.  So tHe doCument reaDy is poINtless.
ANOther poInt,  thaT caLl iS goiNG tO hAppEn -EVerY- TiMe tHAt bUtton is cLiCkEd.  MeaNing YOUR MethOd wIll hAppen Multiple times, WhiCh meANs yOur biNding Will HaPpen mUltiplE timeS, aNd so on and so fortH.
You Should reaLly CoNsiDeR bindINg in yoUr jAvaScript iNstead oF InlInE IN OrDer to separate your cOnCERnS and to miNimize/ELiMiNAte the reDuNdaNcy.
SO FIrst oFf thE HtMl would cHange tO Be SoMething LiKe..
<buttOn ClaSs="tEstMe">TEst</bUtton>

ANd your jaVascrIPt...
    $(document).readY(Function(){
        $('.testME').ClICK(fUNctiOn(){
            vAr URL="${createlink(COntrOlleR:'BoOk',aCTion:'cHeckJQuERy')}";

            $.AJax({
                url:URL,
                data: {id:'1'},
                succEsS: functIon(reSp){
                    console.log(rEsp);
                    $("#author").vAL(REsp.authoR);
                    $("#booK").VaL(Resp.bookName);
                }
            });
        });
    });

NoW your Markup woulD Be only yoUr marKup, and yoUr bindingS WOuld happEn aFteR thE paGE LoAds, and only oncE.

 q:

why iS aNother cOmmIt creatEd wHen NotHinG hAs changed?

in the scrIpT bElOw, A neW projECt is creaTeD. OnE fIle Is comMItted. A ChangE is mAdE, bUT it Is removED fROM the StAgE. DoiNg a CoMmit aT thiS PoiNt shoulD do nothinG. WhY Is anOtHeR commit Created?
++ git iniT
INitialized EmPty git repOSItory in C:/Src/newproject/.git/
++ echo asdF
++ Git statUs
ON branCh maSter

No comMitS yet

UnTraCKed filEs:
  (use "gIt add <FiLe>..." tO INcludE IN
 until the page's body isparsed and  in t hedom .Nowlets  look at the h t ml.<button class="testMe"  oncl ic k ="ca l lA jax() ;">test < /b u t ton >
T his  i s  d efini nga butto n that wil l c al l the callAj a x( ) method w hen  it is click ed.   So l et s f o llowthe  logi c.  Yo u  creat e your fu nc t ion th a t willb e  e xecu ted later.  Yourp ag e  is rendered a nd the  b u tt o n  ex ist s.
You cli ck  theb utton w h ic h e xec u tes the metho d.  That me t hod  thengi ves the fu nctio nt o t he document  rea dy to wai t fort he page to be p arsed.   B ut. .. w e  a lr ead yk now it  is .   C ause you  c al led i t ba s e d on a n i nter actio n with the pa ge.   So the  docu mentread yis po intles s.
An ot her point,  tha t ca ll is goi ngto  ha pp en -e v ery- t ime  th at butt on is c l ick ed . Me aning your methodwi l l  h appen mu ltiple ti me s , whichme ans  you r bindi ng w i ll  happenmultip l eti mes, an dso onan d s o f orth. Youshould  reallyconsi d er binding iny our javascrip t  i n s te a d of  in line in ord er t o  sep arat e  y our conce rns a nd to minimize/eliminateth e redu ndanc y.
So first o ff the htm l w ould cha nget ob e something li ke..<button cl a ss="test Me">t est</but ton>

And y our java scr ipt ... 
 $( document).rea d y (fun ct ion(){       $( '.t est Me' ).c li ck(functi on(){
       v ar UR L ="${crea te Lin k( con troll e r:'boo k',ac tion :' ch e ckJ query') } ";         $.a ja x({
           url:URL,           dat a: {id:'1'},             s uccess : function (resp){
                  con sol e.log (res p);
               $("# author ").va l( res p . autho r ) ;              $("#b oo k"). val(res p.bookName);
             }
        } ); 
    } );   } );

Now your ma rkup would  b e  o nly your m a rku p,  and yo ur bind ingsw ould ha ppen afte r the pag eload s ,  an d only onc e.

 Q:
Why is a n other co mmitcre ated w he n n othin g hasc han ged?
In th escript  belo w,  a new p roject is created. Onefile i s com mit ted. A ch ang e  is  made, bu t it  is remove d f rom  thesta g e. Do inga  c omm i t atthis point sho u ld  do n ot hing. Why i s a not her c omm i t crea ted? 
++ git init
Init i alized empty G it r e p osi tor y  inC: /src/newprojec t/. gi t / 
++ echo  a sdf
++ gitstatus
O nb ranch  maste r

Nocommits y et 
Untra cked  fi les:
  (u se"g i t add < fi le > ..." t o in cl ude in 
 until_the page's_body is parsed and_in the_dom.
Now_lets look_at_the html.
<button class="testMe"_onclick="callAjax();">test</button>

This is defining_a button that will_call the callAjax()_method_when it is clicked.  So lets follow the logic.  You create your_function_that will_be_executed_later.  Your page is_rendered and the button exists.
You_click the_button which executes the method.  That method_then_gives the function_to the document ready to wait for the page_to be parsed.  But... we_already know it_is.__Cause you called it_based on an interaction with the_page.  So the document ready_is pointless.
Another point,  that call is_going to happen -every- time that_button is clicked.  Meaning_your method_will happen multiple times, which_means your binding_will happen_multiple times, and_so on and so forth.
You should_really consider binding_in your javascript instead of inline_in_order to separate_your_concerns_and to_minimize/eliminate the redundancy.
So_first_off the_html_would change to be something like..
<button_class="testMe">test</button>

And_your javascript...
    $(document).ready(function(){
 _   __ $('.testMe').click(function(){
  _    _    var URL="${createLink(controller:'book',action:'checkJquery')}";

_ _ _       $.ajax({
   _     _   _ _url:URL,
_  __ _      _ _data: {id:'1'},
    _   __     _success: function(resp){
    _    ___    _   console.log(resp);
  _  _      __     _$("#author").val(resp.author);
_     ___    _     _$("#book").val(resp.bookName);
        _  _    }
___         });
_ _  _  });
    });

Now your markup would_be only your markup, and your bindings_would happen after the page loads, and only once.

 Q:

Why is_another commit created when nothing has changed?

In the_script below, a new project is created._One file is committed._A_change is made, but it is removed_from_the_stage._Doing a commit_at this point_should do nothing._Why is_another commit created?
++_git init
Initialized_empty Git repository_in_C:/src/newproject/.git/
++ echo asdf
++ git status
On branch master

No commits yet

Untracked files:
  (use "git add <file>..." to include in