What\'s the best way to access my this.rules variable from within $.each()? Any explanation of why/how would also be helpful!
app.Style = function(node) {
th
it is more elegant without var self = this;
app.Style = function(node) {
this.style = node;
this.rules = [];
var ruleHolder = node.find('Rule');
$.each(ruleHolder, function(index, value) {
var myRule = new app.Rule($(ruleHolder[index]));
this.rules.push(myRule);
}.bind(this));
console.log(this.rules)
}