$(".parent-block").on('change', '.z', function(){
readURL(this);
});
var foo = $('#aspnetForm').serializeJSON().replace(regex, subst);
$(".submit").click(function () {
$.ajax({
type: "POST",
dataType: "json",
url: " /Handlers/SendOrderEmail.ashx",
data: json: foo,
contentType: "application/json; charset=utf-8",
success: function (data) {
alert("yes"); },
error: function (e) {
alert("no");
}
});
})
$("#wrap").append("Hello!!!");
DOM как бы принимает форму и затем уже бесполезно так делать? Или я чушь несу?
var tabs = document.querySelector('#advert-add__tabs');
document.querySelector('#advert-add__cat').addEventListener('change', function(e) {
var tabIndex = Array.prototype.slice.call(document.querySelectorAll('#advert-add__cat option')).indexOf(this.querySelector(':checked'));
tabs.querySelector('.active-advert-add').classList.remove('active-advert-add');
tabs.querySelector(`div:nth-child(${tabIndex+1})`).classList.add('active-advert-add');
});