background-position: right 10px top 50%;
$(document).on('click', '.item', (function (e) {
$('.image', this).text('ok');
});
<a class="link" href="#">
<img class="image"src="http://uploadme.ru/images/2015/04/19/img1.jpg" alt="image-1">
</a>
.link {
overflow: hidden;
display: block;
position: relative;
z-index: 1;
width: 300px;
height: 300px;
border: 2px solid #e6d3a0;
border-radius: 20px;
font-size: 0;
text-decoration: none;
background: #777;
}
.image {
min-width: 100%;
min-width: 100%;
-webkit-transition: .5s;
-moz-transition: .5s;
-ms-transition: .5s;
transition: .5s;
}
.link:hover .image {
-webkit-transform: scale(1.5);
-moz-transform: scale(1.5);
-ms-transform: scale(1.5);
transform: scale(1.5);
}
$(document).on('change', '[type="number]', function () {
var item = $(this),
container = item.closest('.item'),
otherItems = $('input', container),
theFuckingCheckboxInput = otherItems.filter('[type="chekbox"]');
console.log(item.attr('min'));
console.log(item.val());
console.log(theFuckingCheckboxInput.is(':checked'));
});
<audio class="audiocontrol" type="audio/mpeg"></audio>
$(function () {
var music = [
'a1.mp3',
'a2.mp3',
'a3.mp3'
],
player = $('.audiocontrol');
$('.play').on('click', function () {
player.attr({
src: 'music/' + music[Math.round(Math.random() * (music.length - 1))]
});
});
player.on('loadeddata', function () {
this.currentTime = 30;
this.play();
});
});
<video data-type="video" data-id="1" type="video/mp4" src="/data/NFL.1.mp4" controls></video>
<video data-type="video" data-id="2" type="video/mp4" src="/data/NFL.2.mp4" controls></video>
$(function (e) {
var videos = $('[data-type="video"]');
videos.on('ended', function () {
var id = parseInt($(this).data('id')) + 1,
video = videos.filter('[data-id="' + id + '"]');
if (video.length) {
video.get(0).play();
}
});
});