HeyMan

Рейтинг
53
Регистрация
23.01.2012

Charli, Пробовал заменить так, но ничего не открывается совсем.


$('#btn-buy').click(function () {
window.location(buyUrls["p" + $(this).data('price')]);
});

ziliboba0213, В горизонтальном положении телефона, видео не вписывается, уходит за пределы экрана.

SeVlad, прилипание сделано стандартно position:fixed

voltest, Да, да, это то что надо. А что в этом страшного?))

voltest, Потому что на сайте нужна именно таблица, с множеством колонок и полей.

Samail:
float:left убери, в стиль div добавь
display: inline-block;vertical-align: top;

в td -
align="center"

Если убираю float:left, пропадает обтекаемость картинки, Текст1 и Текст2 оказываются под картинкой.

Упс, недоглядел, кеш надо было почистить)). Спасибо, работает!

safari, а что на странице прописать для вывода кода в определенном месте?


function rand(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min);
}


function arand(list) {
return list[Math.floor((Math.random() * list.length))];
}


function updateTable() {
$('#domains-auction tbody').empty();
$(domains).each(function () {
var style = '';
if (this.type == 'jackpot') {
style = 'style="display:none;"';
setTimeout(function () {
$('#domains-auction tbody tr.domain-jackpot').fadeIn(1000);
userData.save({jackpot_shown: 1});
}, rand(5000, 10000));

}
$('#domains-auction tbody').append('<tr id="t' + this.lot + '" class="domain-' + this.type + '"' + style + '>' +
'<td>' + this.lot + '</td>' +
'<td style="font-weight:bold"><a href="javascript:void(0);" style="color:black;">' + this.domain + '</a></td>' +
'<td style="font-weight:bold">' + this.year + '</td>' +
'<td style="font-weight:bold">' + this.rank + '</td>' +
'<td style="font-weight:bold">' + this.price + ' rub</td>' +
'<td><button style="width:120px;" ' +
'data-price="' + this.price + '" ' +
'data-rank="' + this.rank + '" ' +
'data-lot="' + this.lot + '" ' +
'data-year="' + this.year + '" ' +
'data-domain="' + this.domain + '" ' +
'data-type="' + this.type + '" ' +
'data-domain_real="' + this.domain_real + '" ' +
'data-profit="' + this.profit + '" ' +
'data-profit_min="' + this.profit_min + '" ' +
'data-profit_max="' + this.profit_max + '" ' +
'class="mini-btn center-block btn colr2 btn-success pull-right">Выбрать<i class="mdi-navigation-arrow-forward btn-i3"></i><div class="ripple-container"></div></button></td>' +
'</tr>');

});
}

feel();
updateTable();
updateUserData();

var jackPotIgroredCount = 0;
setInterval(function () {
if (Math.round(Math.random() * 2) + 1 == 2) {
var index = Math.round(Math.random() * (30 - 1)) + 1;
var $item = $('#domains-auction tbody tr:visible').eq(index);
if ($item.attr('data-clicked') == '1')return;
if ($item.find('button').attr('data-type') == 'jackpot') {
jackPotIgroredCount++;
if (jackPotIgroredCount <= 2) {
console.log('jackpot IGNORED');
return;
} else {
console.log('jackpot cleared');
}
}
$('#domains-auction tbody tr:visible').eq(index).fadeOut(1000).css('background', '#005394').css('opacity', 0.5).find('button').html('Завершено').removeClass('colr2');

}
}, 500);

setInterval(function () {
feel();
updateTable();
}, 35000);

setInterval(function () {
userData.load(["domains_changed", "bDomains"]);
if (userData.domains_changed == 1) {
updateBDomains(userData.bDomains);
}
}, 1000);

function updateBDomains(bDomains) {
$('#domains-my tbody').empty();

for (var domain in bDomains) {
if (bDomains.hasOwnProperty(domain)) {
var item = bDomains[domain];
$('#domains-my tbody').append('<tr id="bd' + item.lot + '" class="domain-' + item.type + '">' +
'<td>' + item.lot + '</td>' +
'<td style="font-weight:bold"><a href="javascript:void(0);" style="color:white;">' + item.domain + '</a></td>' +
'<td style="font-weight:bold">' + item.year + '</td>' +
'<td style="font-weight:bold">' + item.rank + '</td>' +
'<td style="font-weight:bold">' + item.profit + ' rub</td>' +
'<td><button style="width:120px; background-color:#005394 !important;" ' +
'data-price="' + item.price + '" ' +
'data-rank="' + item.rank + '" ' +
'data-lot="' + item.lot + '" ' +
'data-year="' + item.year + '" ' +
'data-domain="' + item.domain + '" ' +
'data-domain_real="' + item.domain_real + '" ' +
'data-type="' + item.type + '" ' +
'data-profit="' + item.profit + '" ' +
'data-profit_min="' + item.profit_min + '" ' +
'data-profit_max="' + item.profit_max + '" ' +
'class="mini-btn center-block btn colr2 btn-success pull-right">Продать<i class="mdi-navigation-arrow-forward btn-i3"></i><div class="ripple-container"></div></button></td>' +
'</tr>');
}
}


}

$('#moneyOut').click(function () {
if (userData.income == 0) {
$('#accountErrorModal').modal('show');
} else if (userData.income < 5000) {
$('#minimalModal').modal('show');
} else {
if (userData.jackpot_buyed == 1 && userData.domainsCount == 1) {
$('#balanceErrorModal').modal('show');
} else {
$('#payoutModal').modal('show');
}

}

});

$('#btnSellDomains').click(function () {
if (userData.domainsCount < 1) {
$('#notEnoughDomainsModal').modal('show');
} else {
window.open('exchange.php');
}
});

$('#domains-auction tbody').on('click', 'button.colr2', function () {
/*if ($(this).data('price') > userData.balance) {
$('#balanceErrorModal').modal('show');
return false;
}*/
$('#domains-auction tbody tr:visible').removeAttr('data-clicked');
$(this).parent().parent().attr('data-clicked', '1');

$('#back-to-top').click();
$('#buyModal .lot').html($(this).data('lot'));
$('#buyModal .price').html($(this).data('price'));
$('#buyModal .year').html($(this).data('year'));
$('#buyModal .domain').html($(this).data('domain'));
$('#buyModal .rank').html($(this).data('rank'));

var earn = ($(this).data('rank') - $(this).data('price'));
var earnRub = uanToRub(earn);

$('#buyModal .earn').html($(this).data('profit') + ' rub.');

$('#btn-buy').data('sum', earnRub);
$('#btn-buy').data('lot', $(this).data('lot'));
$('#btn-buy').data('price', $(this).data('price'));

userData.recentDomain = {
price: $(this).data('price'),
rank: $(this).data('rank'),
lot: $(this).data('lot'),
year: $(this).data('year'),
domain: $(this).data('domain'),
domain_real: $(this).data('domain_real'),
type: $(this).data('type'),
profit: $(this).data('profit'),
profit_min: $(this).data('profit_min'),
profit_max: $(this).data('profit_max')
};
userData.save("recentDomain");
var $clone = $(this).parent().parent().clone();
$(this).parent().parent().hide();
$clone.attr('id', $clone.attr('id') + '-s');
$('#selectedDomain').show().find('table tbody').html($clone);


$('#buyModal').modal('show');
});

$('#selectedDomain tbody').on('click', 'button.colr2', function () {
$('#buyModal').modal('show');
});

/*$('#buyModal').on('hide.bs.modal', function () {
$('#selectedDomain').hide();
});*/

$('#domains-my tbody').on('click', 'button.colr2', function () {
$('#back-to-top').click();
$('#sellModal .lot').html($(this).data('lot'));
$('#sellModal .year').html($(this).data('year'));
$('#sellModal .domain').html($(this).data('domain'));
$('#sellModal .rank').html($(this).data('rank'));

var earn = ($(this).data('rank') - $(this).data('price'));
var earnRub = uanToRub(earn);

$('#sellModal .earn').html($(this).data('profit'));

$('#btn-sell').data('sum', earnRub);
$('#btn-sell').data('lot', $(this).data('lot'));
$('#btn-sell').data('price', $(this).data('price'));
$('#btn-sell').data('profit_min', $(this).data('profit_min'));
$('#btn-sell').data('profit_max', $(this).data('profit_max'));
$('#btn-sell').data('type', $(this).data('type'));

userData.recentDomain = {
price: $(this).data('price'),
rank: $(this).data('rank'),
lot: $(this).data('lot'),
year: $(this).data('year'),
domain: $(this).data('domain'),
domain_real: $(this).data('domain_real'),
type: $(this).data('type'),
profit: $(this).data('profit')
};

domainIsSelling = false;
isSellFinished = false;

$('#btn-sell').removeClass('disabled').find('.text').text('Информация');
$('#sellModal').find('.loading').text("");
$('#sellModal').modal('show');
});

$('#btn-buy').click(function () {
window.open(buyUrls["p" + $(this).data('price')]);
//$('#t' + $(this).data('lot')).hide();
//$('#buyModal').modal('hide');
});

hubbiton, Не важно на сколько, в настройках же ставится количество выводимый цифр, в данном случае их 12, но не суть. Главное чтобы оно было цельным не разделялось точкой.

indenger20, Если удалить окно вообще не появляется.

Разобрался, просто не нужно было удалять последнюю строчку со скобками.

12 3
Всего: 22