Skip to content

Instantly share code, notes, and snippets.

@awinogradov
Created February 28, 2014 13:04
Show Gist options
  • Save awinogradov/9270709 to your computer and use it in GitHub Desktop.
Save awinogradov/9270709 to your computer and use it in GitHub Desktop.
block('credit-card')(
js()(true),
content()(function() {
return {
elem: 'card',
content: [
{
block: 'logo',
mods: { theme: 'gray' },
format: 'svg'
},
{
elem: 'number'
},
{
elem: 'expiration'
}
]
}
})
)
modules.define('i-bem__dom', ['jquery'], function(provide, $, DOM) {
DOM.decl('credit-card', {
onSetMod: {
'js' : {
'inited' : function() {
alert("!");
}
}
}
});
provide(DOM);
});
block('timer')(
js()(true),
content()(function() {
return [
{
block: 'fa-icon',
name: 'clock-o'
},
{
elem: 'time',
content: this.ctx.from
}
]
})
)
modules.define('i-bem__dom', ['jquery'], function(provide, $, DOM) {
DOM.decl('timer', {
onSetMod: {
'js' : {
'inited' : function() {
alert("!");
}
}
}
});
provide(DOM);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment