# $n - номер необходимой строки
head -$n file | tail -1;
db
username
db_pass
sudo mysqldump -u`head -2 file | tail -1` -p`head -3 file | tail -1` `head -1 file | tail -1`> $database.sql
jQuery.fn.extend({
equalHeights: function() {
var maxHeight = 0;
for (var i = 0; i < this.length; ++i) {
if (maxHeight < this.eq(i).height()) {
maxHeight = this.eq(i).height();
}
}
for (var i = 0; i < this.length; ++i) {
this.eq(i).height(maxHeight);
};
return this;
}
});
<button>Воспроизведение</button>
$('#player').on('play', function() {
//Меняем текст кнопки на "Пауза"
});
$('#player').on('pause', function() {
//Меняем текст кнопки на "Воспроизвести"
});
if($('#player').paused) {
$('#player').play();
} else {
$('#player').pause();
}
$(document).ready(function(){
$(window).scroll(function(){
var headerHeight = $('.slider').height();
if ($(this).scrollTop() >headerHeight) {
$('.header').addClass("fixed");
} else {
$('.header').removeClass("fixed");
}
});
});
.fixed {
position:fixed;
top: 0;
left: 0;
right: 0;
}
Note: This method signature was deprecated in jQuery 1.8 and removed in jQuery 1.9. jQuery also provides an animation method named .toggle() that toggles the visibility of elements. Whether the animation or the event method is fired depends on the set of arguments passed.