Mostrar alert bonito con jquery-ui

para hacer nuestros alerts bonitos podemos hacer lo siguiente:

Tener los siguientes llamados en el head:

 <link rel="stylesheet" type="text/css" media="screen" href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.10.0/themes/redmond/jquery-ui.css" />

<script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.9.0.min.js" type="text/javascript"></script>
    
<script src="jquery-ui.min.js"></script>
<style>
        .errorMessage
        {
            font-size:11px;
        }
    </style>

Y la funcion javascript para mostrar el popup bonito es:

function mostrarPopupBonito(errorTitle, errorText, sizeFont) {
            // crear un temporar popup
            var window = $('<div  title="' + errorTitle + '"><span id="dialogMsg">' + errorText + '</span></div>');

            // mostrar el popup
            window.dialog({
                modal: true,
                dialogClass: "errorMessage"
            });
        }

Sean felices! :) Y siéntanse libres de opinar ;)

No hay comentarios:

Publicar un comentario