iOS has an issue preventing background-position: fixed from being used with background-size: cover
// Когда страница загрузится
// получаем все нужные нам ссылки
$(function () {
var total_width = 600;
$("#col-left").resizable({
grid: [1, 10000]
}).bind( "resize", resize_other);
function resize_other(event, ui) {
var width = $("#col-left").outerWidth(),
widthbigcon = $("#big-container").outerWidth(),
widthPercent = 100*width/widthbigcon,
widthRightPercent = 100 - widthPercent;
$('#col-left').css('width', (widthPercent + '%'));
$('#col-right').css('width', (widthRightPercent + '%'));
}
});
getWindowWidth();
$(window).resize(getWindowWidth);
function getWindowWidth() {
var bodyWidth = $('body').outerWidth();
if (bodyWidth <= 590) {
$('body').removeClass('wide');
} else {
$('body').addClass('wide');
}
// здесь необходимо выполнить функцию resize_other, на случай, если окно
// изменит свою ширину, в результате ресайза юзером.
resize_other();
}
$(function () {
var total_width = 600;
/* код из предыдущего блока вставить сюда =) */
$("#col-left").resizable({
grid: [1, 10000]
}).bind( "resize", resize_other);
function resize_other(event, ui) {
if($('body').hasClass('wide')) {
var width = $("#col-left").outerWidth(),
widthbigcon = $("#big-container").outerWidth(),
widthPercent = 100*width/widthbigcon,
widthRightPercent = 100 - widthPercent;
$('#col-left').css('width', (widthPercent + '%'));
$('#col-right').css('width', (widthRightPercent + '%'));
} else {
$('#col-left').css('width', '100%');
}
}
});
Неверно:
<div class='news-item'>
<img src={url} />
<!-- тело новости -->
</div>
Верно
<div class='news-item' style='background-image: url("' + {url} +'");'>
<!-- тело новости -->
</div>
<body>
<div class='no-bubble'>
<p class='click-target'></p>
</div>
</body>
// клик по .click-target не сработает никогда!
$('body').on('click','.click-target', function(){
// do something...
});
$('body').on('click','.no-bubble', function(e){
e.stopPropagation();
});
$('#id').click();
// не равносильно:
$('#id').on('click');
// а работает как:
$('#id').trigger('click');
// т.е. не навешивает обработчик клика, а эмулирует клик по объекту.
$('id').on('click mouseover mouseout', function(e) {
if (e.type === 'click') {
// обработать клик...
} else if (e.type === 'mouseover') {
// ну принцип понятен, да?..
}
});
<select class='quality'>
<option value='медиа объект - качество 240'>240</option>
<option value='медиа объект - качество 360'>360</option>
<option value='медиа объект - качество 480'>480</option>
<option value='медиа объект - качество 720'>720</option>
</select>
// подразумеваю, что переменная player - ваш плеер;
$('.quality').on('change', function() {
var currentTime = player.data("jPlayer").status.currentTime, //сохраняем текущее время
media = $(this).val(); // сохраняем значение выбранной опции
player.jPlayer('setMedia', media); // меняем медиа объект;
player.jPlayer('play', currentTime); // запускаем плеер с того места, где остановилось проигрывание в предыдущем качестве
});
{
start: '2014-09-07T8:00:00',
end: '2014-09-09T17:30:00'
}
<span class="addField add">
<i class="icon"></i>Добавить
</span>
<div class="inputs">
<div>
<input type="file" name="dynamic[]" class="field" >
<span class="remove">Удалить</span>
</div>
</div>
$(document).ready(function () {
$('html').on('click','.add',function () {
$('<div><input type="file" class="field" name="dynamic[]" /><span class="remove">Удалить</span></div> ').fadeIn('slow').appendTo('.inputs');
});
$('html').on('click','.remove', function () {
$(this).parent().remove();
});
});
$(function() {
$('.left-img-thumb').each(function() {
// ошибка в следующей строке
$('.left-img-thumb').unwrap().wrap('<a class="rewrd" target="_blank"></a>');
var urlImg = $(this).attr('src');
var nameImg = /\/(\d+)\.(?:\w{1,5})$/.exec(urlImg);
var j = nameImg[1];
var link = 'http://www.anastasiadate.com/pages/lady/profile/profilepreview.aspx?LadyID=' + j;
// и в этой
$('.rewrd').attr('href', link);
});
});
$(function() {
$('.left-img-thumb').each(function() {
// так верно
$(this).unwrap().wrap('<a class="rewrd" target="_blank"></a>');
var urlImg = $(this).attr('src');
var nameImg = /\/(\d+)\.(?:\w{1,5})$/.exec(urlImg);
var j = nameImg[1];
var link = 'http://www.anastasiadate.com/pages/lady/profile/profilepreview.aspx?LadyID=' + j;
// так будет работать, что-то я это пропустил:
$(this).closest('.rewrd').attr('href', link);
});
});
.wrap .someclass {
transition: all .5s ease;
top: 150px;
}
.wrap:hover .someclass {
top: 0;
}
.circle {
width: 25px;
height: 25px;
line-height: 25px; // центрируем текст по вертикали;
text-align: center; // и по горизонтали;
border-radius: 50%;
}