I hereby claim:
- I am felixakk on github.
- I am felixakkermans (https://keybase.io/felixakkermans) on keybase.
- I have a public key ASBbQo84QlMgd_ris1AjvTzx0xpPs2XiikTPYeOH57XAmgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| # Heads up to front-end developers! | |
| # $.append isn’t the only DOM insertion function! | |
| # It requires containers to append elements into. | |
| # It’s the primary source of excessive div-itis. | |
| # Abandon the practice of e.g. | |
| # @$(‘div.itself div.container div.sub-container div.collection div.comments’).append($comments) | |
| # And switch to the more semantic: | |
| @place = @$("header").after | |
| @place($body) | |
| # Wrap with $.proxy when sending out of context, e.g. |
| // in CoffeeScript: (install Acebug to run CoffeeScript in Firefox developers console) | |
| // for cid, topic of FFApp.window.view.childView.comments.childs | |
| // topic.initializeSubcomments() | |
| // topic.$(".comments, .sub.comment_form").show() | |
| for(var cid in FFApp.window.view.childView.comments.childs){ | |
| topic = FFApp.window.view.childView.comments.childs[cid]; | |
| topic.initializeSubcomments(); | |
| topic.$(".comments, .sub.comment_form").show(); | |
| } |