How can I write this CoffeeScript in jQuery? What am I doing wrong?
$ ->
$('.shop .item > img').click ->
$(this).parent().find(':submit').click()
This is my attempt to convert the CoffeeScript to jQuery
$(document).ready(function () {
$(".shop .item > img").click(function(){
$(this).parent().find(":submit").click()
});
});
You realise coffeescript compiles to javascript right?
You can try it yourself at coffeescript.org but here is the output: