Tagged Questions
0
votes
2answers
32 views
Backbone events with Backbone DOM elements not firing
Events aren't firing and I'm not sure why.
This is how I initialize my view-
tabModel1 = new TabModel()
tabModel2 = new TabModel()
tabs = new TabModels()
tabsView = new Tabs({
...
1
vote
0answers
25 views
How to parallelize d3.js or cubism.js
I'm following the examples on http://adambom.github.io/parallel.js/
Example:
var p = new Parallel([0, 1, 2, 3, 4, 5, 6]),
log = function () { console.log(arguments); };
function fib(n) {
...
0
votes
1answer
15 views
I'm `keyup` listening to elements of a class, but I want to get an attribute from the field that is “keyup'ed”
In my Rails app I am listening on a bunch of input fields with the class regex-field. I am listening with some coffeescript code. Every time I am typing into one of the input fields, the resetRegex ...
0
votes
1answer
37 views
How to create while loops in coffee scripts
Can anyone explain why the increment i++ in the while loop of this coffescript is placed outside of the while loop when converted to javascript ?
if eventtype is 'test'
i = 0
while i < ...
0
votes
2answers
33 views
javascript unable to display weather
I copy the code from jsfiddle and make css javascrip and html in one file, and use wampserver to run it. The css background shows well in gray, but there is no weather information.I double checked ...
0
votes
0answers
21 views
IE Compatibility issue: Javascript submit to other frame
The following coffescript code is to simulate a submit button with a link.
add_hidden = (name, i = 0) ->
input = document.createElement('input')
input.type = 'hidden'
input.name = name
...
0
votes
1answer
25 views
How can I split this Coffeescript into separate files?
Using the Garber method for DOM execution:
SITENAME = {
common: {
init: function() {
// application-wide code
}
},
users: {
init: function() {
// controller-wide code
...
1
vote
2answers
47 views
Translate d3.js JavaScript function to CoffeeScript
Afraid I'm making a simple error in in how I convert this JavaScript to CoffeeScript within a class
In this original example of a world map we have a function :
var quantize = d3.scale.quantize()
...
0
votes
0answers
29 views
Post json with JavaScript to Rails - undefined method stringify keys
I am trying to post a Javascript object to my Rails API in order to create a model object on my server.
Here is how I define my Javascript object (coffee script) :
createList: (list) ->
...
0
votes
2answers
25 views
Best practice: multiple CoffeeScript files on a page
I'm developing a page on my rails app that displays analytics data. It has to make several calls to the Flurry Analytics API to retrieve different events. I'm displaying each piece of data in a div ...
0
votes
1answer
13 views
how to get access to ruby on rails database with coffeescript
This one is simple. lets say i have a model
class Post < ActiveRecord::Base
attr_accessible :author, :content, :title
end
and i want to get instance variables of this class with coffeescript, ...
2
votes
1answer
28 views
Working with JSON response from jQuery (Coffeescript)
I'm trying to get data from the JSON from a http request. I'm returned 10 objects which each contain several keys. I can access a specific object but can't get to the key.
This code get me an object ...
0
votes
1answer
17 views
coffeescript- download html page to pdf clicking on button
I have a application in rails. on clicking a button I am redirecting user to another page which has html content. I want to change the functionality sothat when user click the button it will download ...
0
votes
0answers
39 views
mongoose functions only working on second call
So the weirdest thing is going on. I have a coffeescript class which I use to construct a mongoose schema.
module.exports = class Profit
constructor: (Schema, mongoose) ->
...
0
votes
1answer
26 views
Suppress “Unknown global symbol” warnings in qooxdoo with coffeescript
I'm using qooxdoo in combination with the google maps API. I'm actually using it in combination with coffeescript, but I had the same problem before I moved over to coffeescript (although I suspect ...