Активные пользователи
Стильные функциональные уведомления на jQuery
Добавил: Liga
Категория: Скрипты для Ucoz
Просмотров: 331
Мне нравится
1

После на нужных страницах ставим:
Code
<script type="text/javascript" src="/js/jquery.notty.js"></script>  
  <link rel="stylesheet" type="text/css" href="/css/jquery.notty.css" />  

  <script type="text/javascript">  
  $(document).ready(function() {  
  $('#sample1').click(function() {  
  $.notty({  
  content: "This is a <strong>text notification</strong>."  
  });  
  return false;  
  });  
  $('#sample2').click(function() {  
  $.notty({  
  title: "2011 England riots",  
  content: "Widespread public disturbances, including looting, arson attacks, burglary, robbery and some rioting, are ongoing in some cities and towns in England."  
  });  
  return false;  
  });  
  $('#sample3').click(function() {  
  $.notty({  
  title: "Juno (spacecraft)",  
  content: "Juno is a NASA New Frontiers mission to the planet Jupiter. It was originally proposed at a cost of approximately US$700 million (FY03) for a June 2009 launch.",  
  img: "images/demo/thumb.jpg",  
  showTime: false  
  });  
  return false;  
  });  
  $('#sample4').click(function() {  
  $.notty({  
  content: 'This notification will disappear in <strong>five seconds</strong>.',  
  timeout: 5000,  
  showTime: false  
  });  
  return false;  
  });  
  $('#sample5').click(function() {  
  $.notty({  
  content: "Click on me to try the <strong>callback</strong> function",  
  click:  
  function() {  
  $.notty({  
  content: 'This notification was just created.',  
  title: 'Callback!'  
  });  
  }  
  });  
  return false;  
  });  
  $('#sample6').click(function() {  
  var title = prompt("Please enter the title of the notification","Just another title");  
  var text = prompt("Please enter the the text of the notification","Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur enim massa, euismod id sollicitudin vitae, iaculis quis erat. Duis et ligula sapien, sed varius lectus. Sed quis urna orci.");  
  var img = prompt("Please specify an image src","");  
  if(img != '') {  
  $.notty({  
  content: text,  
  title: title,  
  img: img  
  });  
  } else {  
  $.notty({  
  content: text,  
  title: title  
  });  
  }  
  return false;  
  });  
  $('#sample7').click(function() {  
  $.notty({  
  content: 'I have been clicked, so my work here is complete. Elvi ... wait ... <strong>Superman</strong> has left the building.',  
  img: "images/demo/thumb2.jpg",  
  timeout: 5000,  
  showTime: false  
  });  
  return false;  
  });  
  });  
  </script>


Ссылка вызова уведомления (ставить куда вам нужно):
Code
<p><a id="sample1" href="#">Just a simple text notification.</a></p>


Файл скрипта залейте в папку js и файл стилей в папку css в корне сайта.
Теги материала: Отсутствуют
Добавлять комментарии могут только зарегистрированные пользователи.
[ Регистрация | Вход ]
Зарегистрироваться
Здравствуйте! Вы видите это сообщение так как вы не вошли на сайт под своим логином. Зарегистрируйтесь пожалуйста, и данное окно исчезнет.                                                                                              by
YouScripts
>