navbar-expand-lg
на navbar-expand
.lg
.<canvas id="canvas" width="600" height="600" style="border:solid black 1px;">
Ваш браузер не поддерживает элемент canvas.
</canvas>
<br>
<button onclick="startup()">Инициализировать</button>
<br>
Log: <pre id="log" style="border: 1px solid #ccc;"></pre>
function startup() {
var el = document.getElementsByTagName("canvas")[0];
el.addEventListener("touchstart", handleStart, false);
el.addEventListener("touchend", handleEnd, false);
el.addEventListener("touchcancel", handleCancel, false);
el.addEventListener("touchmove", handleMove, false);
log("initialized.");
}
fieldset
правильно так:var allFieldsets = document.querySelectorAll('fieldset')[0]
// <fieldset class="form__element">…</fieldset>
var allFieldsets = document.querySelectorAll('fieldset')
// NodeList [<fieldset class="form__element">]
<div id="js-transaction"><!-- empty --></div>
onclick="getTransaction('this_key_for_transaction');"
text = name + ': ' + text + '[@Admin]';
text += '<p class=""'> + text + '</p>';
$(text).addClass(userData.uid);
ref.push({text: text});
<p class="">Имя: Текст сообщения [@Admin]</p>
$(text).addClass(userData.uid);
$('<p class="">Имя: Текст сообщения [@Admin]</p>').addClass(userData.uid);
text = name + ': ' + text + '[@Admin]';
text += '<p class=""' id="item' + userData.uid + '"> + text + '</p>';
$('#item' + userData.uid).addClass(userData.uid);
ref.push({text: text});
text = name + ': ' + text + '[@Admin]';
text += '<p class=""' id="item' + userData.uid + '"> + text + '</p>';
$('#item' + userData.uid).attr("data-user", userData.uid);
ref.push({text: text});
var fake2 = ['', ''],
sp = {
0: ['10'],
1: ['11']
};
$(fake2).each(function(index, id) {
$('#sp'+index).html(sp[index]);
});
<form> ... </form>
display: block;
display: none;
$('#form-block2').click(function() {
$('#form-block1').css('display', 'none');
$('#form-block2').css('display', 'block');
});
public function actionIndex()
{
if (Yii::$app->getRequest()->getIsPjax()) {
//return $this->redirect(['user/view','id'=>1]); // doesn't forword in IE.
$this->redirect(['user/view','id'=>1]); // forwards also in IE.
}
$searchModel = new UserSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
if (Yii::$app->getRequest()->getIsPjax()) {
return $this->redirect(['user/view','id'=>1], 200); // forwards also in IE.
}
$('#save-btn').click(function() {
$('.myeditable').editable('submit', {
url: '/newuser',
ajaxOptions: {
dataType: 'json' //assuming json response
},
success: function(data, config) {
if(data && data.id) { //record created, response like {"id": 2}
//set pk
$(this).editable('option', 'pk', data.id);
//remove unsaved class
$(this).removeClass('editable-unsaved');
//show messages
var msg = 'New user created! Now editables submit individually.';
$('#msg').addClass('alert-success').removeClass('alert-error').html(msg).show();
$('#save-btn').hide();
$(this).off('save.newuser');
} else if(data && data.errors){
//server-side validation error, response like {"errors": {"username": "username already exist"} }
config.error.call(this, data.errors);
}
},
error: function(errors) {
var msg = '';
if(errors && errors.responseText) { //ajax error, errors = xhr object
msg = errors.responseText;
} else { //validation error (client-side or server-side)
$.each(errors, function(k, v) { msg += k+": "+v+"<br>"; });
}
$('#msg').removeClass('alert-success').addClass('alert-error').html(msg).show();
}
});
});