文章列表
Ruby: inject
I love inject. To be more specific, I love Enumerable#inject. I find it easy to read and easy to use. It's powerful and it lets me be more concise. Enumerable#inject is a good thing.Of course, I didn't always love it. When I was new to Ruby I didn't understand what it was, so I fou ...
一直都知道jQuery 1.7开始就提示live方法将移除,并且可以使用on方法进行替代,动手做了,才发现,怎么着好像不行?!!最后才发现,原来,没用对语法!
jQuery.on() 绑定点击事件可以用两种方式使用:
$(document).on('click', ...