var ul = document.querySelector('ul'),
elem = ul.querySelector('[class]');
console.log([].indexOf.call(ul.children, elem));
var scrolled;
function load_messes()
{
$.ajax({
type: "POST",
url: "chatread.php",
data: "req=ok",
success: function(test)
{
var $mcaht = $("#mcaht"),
scroll = $mcaht.scrollTop(),
messageCount = $mcaht.children().length;
$mcaht.empty().append(test);
scroll && $mcaht.scrollTop(scroll);
if(!scrolled || messageCount < $mcaht.children().length) {
$mcaht.scrollTop(90000);
!scrolled && (scrolled = true);
}
}
});
}
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//, '') === this.pathname.replace(/^\//, '') && location.hostname === this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
}
}
});
$('a[href*=#]:not([href=#])').click(function(e) {
if (location.pathname.replace(/^\//, '') === this.pathname.replace(/^\//, '') && location.hostname === this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
e.preventDefault();
}
}
});
<ul class="third_menu"><!--Wtoroe dopolnitelnoe menu-->
<li class="openThirdMenu">
li.openThirdMenu:hover .third_menu
- if(Core.state!==undefined&&names[i-2]!==Core.state)
+ if(Core.state!==undefined&&names[i-2]!==Core.state && Core.state.indexOf('.html') < 0)
$(this).attr("value")
? А почему у вас координаты одинаковые?$('.wrap').on('click', function(e){
var button = $(this).find('.button');
if (e.target !== button[0]) {
button.click();
}
});
<html lang="en" class="android mobile portrait"
.android, .ios-icon {
position: absolute;
position: fixed;
top: 0;
z-index: 999;
width: 100%;
height: 100%;
background: #000;
display: none;