I've got this javascript code inside an Ember.View
class definition:
didInsertElement: function(){
var view = this;
var $view = this.$().find('.xxx');
Ember.run.later($view, function(){
$view.css(...);
}, 100);
},
I don't understand the $view = <some jQuery method result>
syntax. I've googled to see if $view
is a valid syntax for a variable and if it means anything special. From what I can tell, var $view
is just declaring a regular javascript variable. The $
is a valid identifier character. So, saying var $view
is no different from saying var view
.
PS: The this.$()
inside of Ember view gives us the jQuery object for the corresponding ember view object.