jquery Programming Glossary: grocery
Refactoring a large block of chained if-else statements http://stackoverflow.com/questions/3640843/refactoring-a-large-block-of-chained-if-else-statements like to refactor this...any suggestions if this .text Grocery .type_changer .attr id gro else if this .text Restaurant .type_changer.. share improve this question Look here if this .text Grocery .type_changer .attr id gro else if this .text Restaurant .type_changer.. away. What would left over Right the text and id values Grocery gro Restaurant res Bar bar Pizza Delivery piz Quick Service..
Refactoring a large block of chained if-else statements http://stackoverflow.com/questions/3640843/refactoring-a-large-block-of-chained-if-else-statements chained if else statements This seems like overkill and I would like to refactor this...any suggestions if this .text Grocery .type_changer .attr id gro else if this .text Restaurant .type_changer .attr id res else if this .text Bar .type_changer.. .attr id .slice 1 5 .number_changer .attr id five5 jquery share improve this question Look here if this .text Grocery .type_changer .attr id gro else if this .text Restaurant .type_changer .attr id res else if this .text Bar .type_changer.. .attr id sal You have to think all the repetitions away. What would left over Right the text and id values Grocery gro Restaurant res Bar bar Pizza Delivery piz Quick Service qui Retail ret Salon sal Let hold them in some data structure...
|