function myplace()
{
if(navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
var lat23 = position.coords.latitude;
var lon23 = position.coords.longitude;
return [lat23, lon23];
});
} else
{
alert("Geolocation API не поддерживается в вашем браузере");
}
}
function geocoding()
{
var my_adress;
var api_key = 'AIzaSyAsuS1MqzRBzRv1HRrfrlyoMRlkrVXEx0g';
var cordinats = myplace();
var loctype = 'ROOFTOP';
var restype = 'street_address';
var position = cordinats.join(",");
var data = {latlng: position, location_type: loctype, result_type: restype, key: api_key};
$.ajax({
method: "GET",
url: "https://maps.googleapis.com/maps/api/geocode/json",
data: data,
dataType: 'json',
success: function (result) {
console.log(result)
my_adress = result.results[0].formatted_address;
alert("Вы здесь" + " " + "<" + " " + my_adress + " " + ">");
},
error: function (err) {
console.log("Ошибка сервера")
}
})
}
get_arr().toString() == get_arr().toString()
JSON.stringify(get_arr()) == JSON.stringify(get_arr())
var arr1 = get_arr();
var arr2 = arr1;
arr1 == arr2 // true
<div class="container">
<div class="row">
<h1>Bootstrap Tabs</h1>
<div class="tabbable">
<ul class="nav nav-tabs">
<li class="active"><a href="#tab1" data-toggle="tab">Section 1</a></li>
<li><a href="#tab2" data-toggle="tab">Section 2</a></li>
<li><a href="#tab3" data-toggle="tab">Section 3</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="tab1">
<p>I'm in Section 1.</p>
</div>
<div class="tab-pane" id="tab2">
<p>I'm in Section 2.</p>
</div>
<div class="tab-pane" id="tab3">
<p>I'm in Section 3.</p>
</div>
</div>
</div>
</div>
</div>
$(function(){
var hash = window.location.hash;
hash && $('ul.nav a[href="' + hash + '"]').tab('show');
$('.nav-tabs a').click(function (e) {
$(this).tab('show');
var scrollmem = $('body').scrollTop();
window.location.hash = this.hash;
$('html,body').scrollTop(scrollmem);
});
});
#container{
width: 400px;
height: 100px;
border: 1px solid black;
padding: 2px; /* Устанавливаем внутренний отступ */
margin: 0 auto; /* Размещщаем блок по центру */
}
#container:before{
display: inline-block;
height: 100%;
vertical-align: middle;
content: "";
text-align: center;
}
p{
font-size: 30px;
}
span{
display: inline-block;
vertical-align: bottom;
font-size: 10px;
}
Jsoup
.connect("https://www.vyatsu.ru/studentu-1/spravochnaya-informatsiya/raspisanie-zanyatiy-dlya-studentov.html")
.maxBodySize(0)
.get();
body:has(.hidden-menu-ticker:checked) {
overflow-y: hidden;
}
var speed = 1;
var timer = 0;