Created
March 21, 2014 14:45
-
-
Save AstakhovArtem/9687829 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App = { | |
color: 'white', | |
updateColor: function(new_color) { | |
this.color = new_color; | |
}, | |
getColor: function(){ | |
console.log(this.color); | |
} | |
}; | |
App.updateColor('orange'); | |
updateColor = App.updateColor; | |
updateColor('green'); | |
App.getColor(); | |
function foo() { | |
setTimeout(console.log(this), 100); | |
} | |
foo(); | |
function foo() { | |
var x = 10; | |
var y = 20; | |
return function () { | |
console.log([x, y]); | |
}; | |
} | |
var x = 30; | |
var bar = foo(); | |
bar(); | |
//---------------------- | |
что такое $this в темплейте | |
Что нужно делать, если нужно добавить дочерний блок в контент, но не исправляя файл page.xml? | |
что такое: | |
type (что это такое, и для чего нужен) | |
<reference name="right"> | |
<block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml" before="-"></block> | |
</reference> | |
какой класс будет у блока cart_sidebar и где он находится | |
что означает before="-" | |
name | |
as | |
after | |
before | |
template | |
+ мб переводы |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment