Great Way For Notifying Or Alerting Your WordPress Site Visitors For Anything

EMC2 Alert Boxes is a free WordPress plugin that allows you to use jQuery and HTML5 animations for creating a cool functional alert system in your WordPress site. The plugin allows you to display alert boxes by using [emc2alert] shortcode or by calling the $().emc2alert() jQuery function. You can see it working live at http://alert.emc2innovation.com.

Alert Boxes

Installation & Usage: Install and activate it. After activation you can start using its shortcode on any page-post by using its quick-create TinyMCE icon present it WordPress visual editor.

OR you can also create alerts on the fly by using its jQuery function call.

Shortcode: [emc2alert]This is some text![/emc2alert]
-and-
jQuery: $('body').emc2alert({ text:"This is some text!" });

Advanced Usage Option & Parameters:

Shortcode:

[emc2alert type=”success” style=”normal” width=”300px” position=”top” wpbar=”auto” visible=”visible” closebtn=”1″ title=”Introducing…” animate=”true”]A great way to alert your visitors![/emc2alert]

Defaults:

  • type: “info” – “success”, “warning”, “error” also available
  • style: NULL – “normal” displays as block at shortcode location, or “fixed” for top or bottom of page
  • width: NULL – accepts position with units, ie “300px”, “100%” or “5em”
  • position: “top” – If style=”fixed”, position can be set to top or “bottom” of page
  • wpbar: “auto” – Auto-detects WP Admin Bar. Can be set to TRUE or FALSE as well to set compensation.
  • visible: TRUE – Set to FALSE to hide
  • closebtn: FALSE – Set to TRUE to add a close button to the box
  • title: “Alert Title” – Box title
  • animate: FALSE – Set to TRUE to enable slideUp() and slideDown() jQuery animations on open and close!

jQuery:

$('body').emc2alert({           // Prepends Alert Box to 'body' element
    title: "Your Title",        // or $('myTitleDiv').html()
    text: "Your Message",       // or $('myMsgDiv').html()
    type: "info",               // 'info', 'warning', 'error', 'success' - determines bg colors
    style: "normal",            // 'normal', 'fixed' - in page or fixed to top or bottom
    visible: true,              // true, false - hides if necessary
    position: "top",            // 'top', 'bottom' - positions box on page
    width: null,                // '100%', '960px' - specify units
    closebtn: false,            // true, false - displays close button in corner
    wpbar: false,               // true, false, 'auto' - adds top margin to avoid admin bar, with auto-detect
    animate: false              // true, false - adds open/close animation
});

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.