Сообщение от todayz
|
А можно подробнее?
|
Типа иллюстрации...
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=windows-1251' />
<script src='http://code.jquery.com/jquery-latest.js'></script>
<!--
<script src="https://code.angularjs.org/1.3.9/angular.min.js"></script>
<script src="https://code.angularjs.org/1.3.9/angular-route.js"></script>
-->
<style type='text/css'>
#message {
display: none;
}
span {
display: inline-block;
padding: 10px;
background-color: #5d4595;
}
</style>
<script type='text/javascript'>
$(function(){
var win;
$('a').click(function(){
if (win) {
clearTimeout(win);
};
$('#message').stop().hide().text($(this).attr('title')).fadeIn();
win=setTimeout(function(){
$('#message').stop().fadeOut();
},2000);
});
});
</script>
</head>
<body>
<a href="#" title="String 1"><span>1</span></a>
<a href="#" title="String 2"><span>2</span></a>
<a href="#" title="String 3"><span>3</span></a>
<div id='message'></div>
</body>
</html>