Simple image host.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

global.js 789B

123456789101112131415161718192021222324252627282930313233
  1. (function() {
  2. window.util = {};
  3. util.notify = function notify(title, body) {
  4. var elem = $("#notify-box");
  5. elem.children(".title").html(title);
  6. elem.children(".body").html(body || "");
  7. elem.addClass("active");
  8. notify.timeout = setTimeout(function() {
  9. elem.removeClass("active");
  10. }, 5000);
  11. }
  12. $(document).ready(function() {
  13. $("#notify-box").on("mouseenter", function() {
  14. clearTimeout(util.notify.timeout);
  15. });
  16. $("#login-form").on("submit", function(evt) {
  17. evt.stopPropagation();
  18. evt.preventDefault();
  19. util.notify("Feature Not Implemented", "This feature is not implemented.");
  20. });
  21. });
  22. util.htmlEntities = function(str) {
  23. return str.replace(/&/g, "&")
  24. .replace(/</g, "&lt;")
  25. .replace(/>/g, "&lt;")
  26. .replace(/"/g, "&quot");
  27. }
  28. })();