window.jQuery( document ).ready( function( $ ) {
alert("2");
});
$(document).ready( function() {
var $=window.jQuery;
alert("1");
});
// 2, 1
$(document).ready( function() {
var $=window.jQuery;
alert("1");
});
window.jQuery( document ).ready( function( $ ) {
alert("2");
});
// 1, 2
// выводим в HTML-таблицу все данные клиентов из таблицы MySQL
while($data = mysqli_fetch_array($wwwlist)){
echo '<tr>';
echo '<td>' . $data['name'] . '</td>';
echo '<td><textarea name = "data[' . $data ['unid'] . '][email]">' . $data ['email'] . '</textarea></td>';
echo '<td> <textarea name = "data[' . $data ['unid'] . '][indexfiles]">' . $data ['indexfiles'] . '</textarea></td>';
echo '<td> <textarea name = "data[' . $data ['unid'] . '][alias]">' . $data ['alias'] . '</textarea></td>';
echo '<td> <textarea name = "data[' . $data ['unid'] . '][charset]">' . $data ['charset'] . '</textarea></td>';
echo '</tr>';
}
foreach ($_POST["data"] as $id => $fields) {
//UPDATE table WHERE unid = $id SET email = $fields[email], indexfiles= $fields[indexfiles]
}
$(document).ready(function() {
$('a[href^="#"]').click(function(){
//Сохраняем значение атрибута href в переменной:
var target = $(this).attr('href');
var self = this;
$('html, body').animate({scrollTop: $(target).offset().top}, 500, function () {
$(self).siblings().removeClass("active");
$(self).addClass("link active");
});
return false;
});
});
function init() {
if (window.innerWidth >= 769) {
window.addEventListener('scroll', function(e) {
var header;
var distanceY = window.pageYOffset || document.documentElement.scrollTop,
shrinkOn = 1,
header = document.getElementById("name");
if (distanceY > shrinkOn) {
header.classList.add("red");
} else {
if (header.classList.contains("red")) {
header.classList.remove("red");
}
}
});
}
}
window.onload = init();
select * from hotels
right join rooms ON hotels.id = rooms.hotel_id
AND rooms.price > 300
right join props ON hotels.id = props.hotel_id
AND props.room_id = rooms.id
AND props.prop_id = "wifi"