jeudi 10 décembre 2015

Recommended way to find typos in jquery

I have developed a jquery file which I use in the context of a Wordpress plugin. The jquery contains a typo:

alert('prv_requestSelectionComplement check odds_pos for horse_id='+tmpSel.horse_id+' oddsPositionLimit='.JSON.stringify(oddsPositionLimit)+' odds_pos='+complement.odds_pos);

You see: Before JSON I used the php '.' instead of the jQuery '+'

I did not get any error nor warning. The function just stopped working. It took me a while to spot the problem with careful code review. Is there a possibility to get a reasonable error message without double checking all the places where I edited? For example using FireBug? What is the recommended way to deal with this problem?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire