ealert jQuery plugin

the plugin

ealert is a 4k jQuery plugin that attempts to replace javascript alert() native function.

pre-requisites

ealert plugin works with the latest versions of jQuery, i don't test it with all versions but i think that it run with jQuery 1.3+ .

compatibility

desktop browsers: runs on Firefox, Safari, Chrome, Opera and IE8+
mobile browsers: Safari and Chrome on iOS, Opera mini on Android

how to use

$.ealert(content,{customOptions});

examples

custom options

option name type default description
button_text string Accept accept button custom string
closeonesc bolean true if true trigger close event on press ESC keyboard button
closeonbk bolean true if true trigger close event on click over background
background hexadecimal color #000 background css property aply to modal background
opacity float 0.75 background opacity [0-1]
width int 300 alert modal pixels width
button_aling string center aling button [center, left or right]
beforeopen function false before open callback function
onopen function false on open callback function
onaccept function false on accept callback function
onclose function false on close callback function
css string false your own custom css .class (*see custom_modal.css example)

license and code

All code is available on this github repository

Distributed under the MIT license:
http://www.opensource.org/licenses/mit-license.php

Copyright (c) Diego VilariƱo:
http://www.dieg0v.com/ - http://www.sond3.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

author

created by Diego VilariƱo | @dieg0v | part of Sond3 Team.

if you use it, let me know and make me happy :-) . Thanks!

Fork me on github