{"comment":{"url":"https://api.github.com/repos/amizony/bloc-jams/comments/11352140","html_url":"https://github.com/amizony/bloc-jams/commit/b3b64758e77c8f15456655b0c7c10bbe84589f9c#commitcomment-11352140","id":11352140,"user":{"login":"amizony","id":12247390,"avatar_url":"https://avatars.githubusercontent.com/u/12247390?v=3","gravatar_id":"","url":"https://api.github.com/users/amizony","html_url":"https://github.com/amizony","followers_url":"https://api.github.com/users/amizony/followers","following_url":"https://api.github.com/users/amizony/following{/other_user}","gists_url":"https://api.github.com/users/amizony/gists{/gist_id}","starred_url":"https://api.github.com/users/amizony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amizony/subscriptions","organizations_url":"https://api.github.com/users/amizony/orgs","repos_url":"https://api.github.com/users/amizony/repos","events_url":"https://api.github.com/users/amizony/events{/privacy}","received_events_url":"https://api.github.com/users/amizony/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"b3b64758e77c8f15456655b0c7c10bbe84589f9c","created_at":"2015-05-25T16:29:22Z","updated_at":"2015-05-25T16:29:22Z","body":"It may sounds strange for you but ```this``` wasn't really a problem for me. (It was introduced a few checkpoints ago maybe - but didn't really matter).\r\nFor me the ```this``` refer to what I would call *the element on which the function is triggered*\r\n\r\n```javascript\r\nvar myFunction = function(){\r\n       var subText = $(this).text();\r\n       $(this).text(subText + \"!\");\r\n};\r\n$('p').click(myFunction());\r\n// that event happens when we click on any <p> \r\n// in that call of myFunction, 'this' will be the <p> we clicked on\r\n\r\n$('div .owl').click(myFunction());\r\n// that event happens when we click on any element with the class 'owl' nested in a <div>\r\n// in that call of myFunction, 'this' will be the 'owl element' we clicked on\r\n```\r\n\r\nHere the new concept of introducing a template (a piece of html code inside the javascript code) was new and unfamiliar (and even unexpected).\r\n\r\n```this``` was more a very usefull tool, I was kind of waiting for, to be able to do advanced things.\r\nTemplates was an unexpected way of making things more complicated (but more efficient - I don't refute this).\r\n```this``` became more complicated with Angular, for it has kind of a different behaviour."}}