Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

jQuery Message


May 07, 2021 jQuery


Table of contents


jQuery Message

The jQuery Message plug-in allows you to easily display feedback messages in an overlay. M essages automatically disappear after a period of time and do not require clicking the OK button, etc. Users can quickly hide information by moving the mouse or clicking anywhere.

The current version of the plug-in is 1.0.0.

Visit the jQuery Message website to download the jQuery Message plug-in.

How to use it

To use the Message plug-in, select the element to display the text and pass it as an argument:

$(function() {
  $().message("Hello world!");
  // or
  $(".feedback").message();
});

There are several default options available. If you're interested, check out the full demo below.

Example demonstration

jQuery Message plug-in demo.

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>jQuery Message 插件</title>

<link rel="stylesheet" type="text/css" media="screen" href="http://jquery.bassistance.de/message/jquery.message.css" rel="external nofollow" target="_blank"  />

<script src="http://jquery.bassistance.de/message/lib/jquery-1.3.2.js" rel="external nofollow"  type="text/javascript"></script>
<script src="http://jquery.bassistance.de/message/jquery.message.js" rel="external nofollow"  type="text/javascript"></script>

<script type="text/javascript">
$(function() {
   $().message("Hello world, on document ready!");
 $("#demo").submit(function(e) {
     e.preventDefault();
       $().message($("#message").val());
   })
});
</script>

<style type="text/css">

</style>

</head>
<body>

<h1 id="banner">jQuery Message 插件演示</h1>
<div id="main">
   
  <form id="demo">
      <input name="message" id="message" />
       <input type="submit" value="显示消息" />
    </form>
 
</div>

</body>
</html>


Related articles

jQuery EasyUI Tutorial: jQuery EasyUI Window Plug-in - Messager Message Box