Questions tagged as 'coffeescript'

1
answer

How to mount a regex?

I'm setting up a bot for rocketchat to turn on and off machines in google cloud, I need to mount a regex that covers the words turnon and turnoff. Could someone help me with this?     
asked by 27.11.2017 / 14:27
1
answer

What would be the equivalent of "with" Javascript in Coffeescript

Hello, I was studying this new "language" that looks promising when I came across it. Is not this expression in Coffeescript or something similar?     
asked by 24.03.2017 / 14:07
1
answer

Rails. Uncaught ReferenceError: jQuery is not defined

I'm implementing a portion of notifications in a rails project, from a tutorial and I'm getting this error. Uncaught ReferenceError: jQuery is not defined at notifications.self-3e6330e4ab7198d8dee61da361c9c6cd1a536fd445b9ce4b6792ea023705a...
asked by 31.08.2017 / 17:46
1
answer

Return / Scope problems in CoffeeScript / Javascript

I have in Rails a get '/estados_por_pais/:pais_id route that returns me a JSON array with states in this country. This works perfectly. I created a CoffeeScript class with a static method that should fetch this array of states: class...
asked by 02.05.2014 / 16:30
1
answer

Dealing with events in elements added later

Consider the following HTML: <div id="div"> <button class="foo">Botão1</button> </div> And the following script: $(".foo").click -> alert "foobar" $("#div").append '<button class="foo">Botão2</...
asked by 11.09.2014 / 14:42
0
answers

Infinite Scroll with CoffeeScript

Does anyone know a little coffescript to help me with this method? renderContent: -> $listContent = $ "<div/>", class: "me-list-content" $ul = $ "<ul/>" qtd = 6 key = 0...
asked by 27.04.2018 / 21:33
1
answer

About (function () {...} ()) and callThis ()

CoffeeScript compiles your files into one: (function(){ // código aqui }()).callThis(); JSFiddle: link Sometimes we find a variation on the internet: (function(){ // código aqui }()); JSFiddle: link What is the use of th...
asked by 08.07.2014 / 13:30