var b = moment.tz("May 12th 2014 8PM", "MMM Do YYYY hA", "America/Toronto");
<tr>
<input type="hidden" value="{{sysid}}" class="sysid">
<td>
<p class="bold">{{personName}}</p>
<p class="bold">{{personAddress}}</p>
</td>
</tr>
Mustache.render(templateHtmlString, {
sysid: 456,
personName: 'John Doe',
personAddress: '123 Main St',
});
this.menuBbtn = document.querySelector('.top-menu');
this.btnGarageNext = document.querySelector('#btn-garage-next');
this.btnGaragePrev = document.querySelector('#btn-garage-prev');
(this).parentNode.addClass("navigation-list__item_active");
$(this).parent().addClass("navigation-list__item_active");
$(this).closest(".navigation-list__item").addClass("navigation-list__item_active");
var initialState = serialize();
function serialize() {
var data = [];
var rows = myTable.rows;
for (var i = 1; i < rows.length; i++) {
var row = rows[i];
var id = row.cells[0].textContent;
var info = row.cells[2].firstChild.value;
var status = row.cells[3].firstChild.value;
data.push({
id: id,
info: info,
status: status
});
}
return data;
}
function onSubmit() {
var data = [];
var currentState = serialize();
for (var i = 0; i < currentState.length; i++) {
var entry = currentState[i];
var oldEntry = initialState.find(e => e.id == entry.id);
if (oldEntry.state != entry.state || oldEntry.info != entry.info) {
data.push(entry);
}
}
// отправить реквест с данными из data
}
<!-- HTML -->
<div class="header__button">
<button class="btn header__basket_btn">
<i class="icon feather-shopping"></i>
<i class="close-icon feather-close"></i>
</button>
<button class="btn header__search_btn">
<i class="icon feather-search"></i>
<i class="close-icon feather-close"></i>
</button>
<button class="btn header__user_btn">
<i class="icon feather-user"></i>
<i class="close-icon feather-close"></i>
</button>
</div>
/* CSS */
.header__button .btn .close-icon {
display: none;
}
.header__button .btn.close .icon {
display: none;
}
.header__button .btn.close .close-icon {
display: inline;
}
// JavaScript
$('.header__button .btn').click(function() {
$(this).toggleClass('close');
});