Sliding with arrow key
Drupal.behaviors.spaintSilkModal = {
attach: function (context, settings) {
// Declare constants for right and left arrow keys.
var RIGHT_ARROW = 39;
var LEFT_ARROW = 37;
$(document).keydown(function (event) {
if (event.which == RIGHT_ARROW && !$('.ico-next-track').hasClass('keydown')) {
$('.ico-next-track').addClass('keydown').click();
}
if (event.which == LEFT_ARROW && !$('.ico-previous-track').hasClass('keydown')) {
$('.ico-previous-track').addClass('keydown').click();
}
});
}
}