...
<head>
<link href="css/common.css" rel="stylesheet">
<?php if($user['color_scheme']): ?>
<link id="themelink" href="css/<?=$user['color_scheme']?>.css" rel="stylesheet">
<?php else: ?>
<link href="css/default.css" rel="stylesheet">
<?php endif; ?>
</head>
...
<input type="radio" value="theme1" name="theme">
<input type="radio" value="theme2" name="theme">
var themelink = $('#themelink')
$('input[name="theme"]').on('change', function(){
var theme = this.value;
themelink.attr('href', 'css/'+theme+'.css');
$.post('/some/server/path',{theme:theme}).then(function(response){
console.log('theme has been changed');
})
});
window.location.replace("http://localhost/BDsteam.php");
var MyModel = Backbone.Model.extend({
initialize: function(){
//create MyView with {model:this}
}
});
var MyView = Backbone.View.extend({
initialize: function(options){
//your code
this.model.on('customEventName', this.remove);
}
});
var MyCollection = Backbone.Collection.extend({
model: MyModel
});
//go
var items = new MyCollection(arrayOfItems);
items.each(function(item){
if(item.get('someParam'))
item.trigger('customEventName');
})
--root
----node_modules
----projects
----gulpfile.js
@keyframes progress{
from{
width: 0;
}
to{
width: 100%;
}
}
.progressbar:after{
content: '';
position: absolute;
height: 100%;
animation: progress 60s linear forwards;
}
@keyframes hide{
from{
opacity: 1;
}
to{
opacity: 0;
}
}
.progressbar{
animation: hide 100ms 60s ease-in-out;
}
.row {
margin-right: -15px;
margin-left: -65px;
width: 900px;
}
.row {
margin-right: -15px;
margin-left: -15px;
}
<form method="post" action="/order">
<input type="hidden" name="memory" value="<?=$_GET['memory']?>"/>
<input type="hidden" name="memory" value="<?=$_GET['color']?>"/>
<input type="submit" value="Submit" />
</form>
.cd-add{
animation: translate-opacity 1s linear forwards;
}
@keyframes translate-opacity{
0%{
transform: translate(0, 0);
opacity: 0;
}
50%{
transform: translate(0, 100px);
opacity: 0;
}
100%{
opacity: 1;
transform: translate(0, 100px);
}
}