Local variables are one of the things CoffeeScript doesn't compile to modern JavaScript automatically: it uses `var` instead of `const` or `let`. Besides, using `$this = $(this)` is usually done to reference the current object in another function where the current object is a different one. Here we were using it with no clear purpose.
8 lines
171 B
CoffeeScript
8 lines
171 B
CoffeeScript
"use strict"
|
|
|
|
App.SocialShare =
|
|
|
|
initialize: ->
|
|
$(".social-share-button a").each ->
|
|
$(this).append("<span class='show-for-sr'>#{$(this).data("site")}</span>")
|