action="edit.php?order_id=<?php echo $id; ?>"
url: "edit.php",
<input type="hidden" class="order-id" data-order-id="<?php echo $id; ?>">
$("form").submit(function(e){
e.preventDefault();
var id = $('.order-id').data('order-id');
let order_name = $('input[name="order_name"]').val();
let order_desc = $('textarea[name="order_desc"]').val();
let order_price = $('input[name="order_price"]').val();
let user_id = $('input[name="user_id"]').val();
let order_date = $('input[name="order_date"]').val();
$.ajax({
type: "POST",
url: `edit.php?order_id=${id}`,
dataType: "html",
data: {
order_name: order_name,
order_description: order_desc,
order_price: order_price,
user_id: user_id,
order_date: order_date,
change: true
},
success: function(data) {
alert(data);
}
});
});
});
<form id="form">
<div id="dii">
<input type="hidden" id="login" value="<? echo $login; ?>">
<button type="submit" id="" class="status" value="1">1</button>
<button type="submit" id="" class="status" value="2">2</button>
<button type="submit" id="" class="status" value="3">3</button>
<button type="submit" id="" class="status" value="4">4</button>
</div>
<div id="app" width="640" ></div>
</form>
$("#dii>button").on('click', function(e){
e.preventDefault();
var status = $(this).val();
console.log(status);
var login = document.getElementById('login').value;
$.ajax({
type: 'post',
url: 'preload.php',
data: {status: status, login: login},
success: function(data){
//alert("Ваше сообщение отпрвлено!");
alert(data);
$("#app").empty();
$("#app").append(data);
}
});
});
#button {
color: green;
width: 250px;
height: 60px;
}
#button2 {
color: green;
width: 250px;
height: 60px;
}
#button3 {
color: green;
width: 250px;
height: 60px;
}
#button4 {
color: green;
width: 250px;
height: 60px;
}
if (!$(e.target).hasClass('menu-click')) funk(false);
проверяете на класс .menu-click
, тк у бургера этого класса нет, он закрывается.mix-blend-mode
Спасибо конечно большое) А можно как то без блока content?
$(".exitblock1").last().remove();
unwrap();
- убивает родителя, но при этом сохраняет детей.clid.unwrap();
$(this).find('.question__plus').toggle(function ()
$(document).on('keyup', '.input', function(){
var $this = $(this);
var $delay = 450;
var search_data = $this.val();
clearTimeout($this.data('timer'));
$this.data('timer', setTimeout(function(){
if(search_data.length > 1) {
$.ajax({
type: 'POST',
url: '/core/action/path.php',
data: {
//data
},
success: (data) => {
//result
}
});
}
}, $delay));
});
$('.search').on('keyup', function() {
var $this = $(this);
var $delay = 500;
clearTimeout($this.data('timer'));
$this.data('timer', setTimeout(function(){
console.log('test n-125');
// ...code
}, $delay));
});