Feb
22

jAlert a jQuery Alert Box Plugin

jAlert is a very easy to use alert box plugin for the javascript framework jQuery. I developed this plugin to use in my own projects and now that I have my own blog I decided to share it with the world.
jalert

Here is a quick example on how is used:

$(document).ready(function()
{
//have an alert box displayed on body load.
$('body').jAlert('Welcome to jAlert Demo Page', "success");

});

Requirements:

Demo:

Download:

I would love to see how you are using jAlert so please post your links in the comments or send me an email. Also, feel free to send your suggestions or any question you guys might have.

8 Comments to “jAlert a jQuery Alert Box Plugin”

  • [...] Julian Castaneda » Blog Archive » jAlert a jQuery Alert Box Plugin John   Comment RSS « Suspekt… A PHP Security Blog [...]

  • Hi, I need a dialog box that user can either click on ‘OK’ or ‘Cancel’. can you do that?

    • Liao,
      Sorry for the late reply, but I was out of the country. The Current version of jAlert does not support dialog box functionality. But I might consider adding it in future iterations.

  • You have tested it and writing form your personal experience or you find some information online?

  • Hi,
    I'm using jAlert to produce number of alerts in validation…I want to set focus for the respective text box, but following code is not working. Is it possible to set focus after the alert box is closed.
    if ($('#txtUsername').val()=='') {
    jAlert('Please enter Username');
    $('#txtUsername').focus();
    return false;
    }
    Thanks

  • [...] jAlert a jQuery Alert Box Plugin [...]

  • Mike, not sure what you mean in the drop down? You can add html to the actual message of the alert
    thanks

  • Hello, i have a problem with jConfirm, i should work just like the normal javascript confim box but it doesn't, here's an example

    <input type="submit" value="click" onClick="return jConfirm('are you sure?')">

    If i use the normal confirm it stops the script until a response is given, with jConfirm however, the form is still being submitted, even if no answer is given, any workarounds?

    Thanks in Advance

Leave a comment