My stand: paragraph and button. a simple click on a button hides a paragraph, when you click on a button when you press ctrl - the paragraph is not hidden, but a frame is added (that is, we cancel the usual action). So the code:
$(function(){ $('button').click(function(event){ $('p').animate({opacity: 'toggle'}, 2000); if(event.ctrlKey == true){//если при щелчке нажата клавиша ctrl $('p').stop(true); //останавливаем анимацию и очищаем очередь $('p').queue('fx', function(){ $(this).css('border', '3px solid green'); //добавляем в очередь новое действие $(this).dequeue('fx'); //удаляем наше действие из очереди }); } }); });
that's all)