Acá mi código:
Código Javascript:
Ver original
<!DOCTYPE html> <html lang="es"> <head> <title>TecPokémon | Noticias</title> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="../public/css/admin-style.css"> <link rel="stylesheet" type="text/css" href="http://localhost/tecpokemon/complements/jquery-ui/css/custom-theme/jquery-ui-1.10.3.custom.css"> <link href='http://fonts.googleapis.com/css?family=Oxygen:300' rel='stylesheet' type='text/css'> <script type="text/javascript" src="http://localhost/tecpokemon/complements/jquery-ui/js/jquery-1.9.1.js"></script> <script type="text/javascript" src="http://localhost/tecpokemon/complements/jquery-ui/js/jquery-ui-1.10.3.custom.min.js"></script> <script src="http://localhost/tecpokemon/includes/ckeditor/ckeditor.js"></script> <script> $(function(){ $('#newsAdd').dialog({ autoOpen: false, modal: true, width: 800, height: 'auto', close: function(){ $('#formNews input[type="text"]').val(''); $("#editor1").empty(); } }); $('#addNew').on('click', function(){ $('#newsAdd').dialog('open'); }); }); </script> </head> <body> <?php include('../views/admin/header-nav.html'); ?> <div class="hiden" id="newsAdd" name="Agregar Noticia" title="Agregar Noticia"> <form action="" method="post" id="formNews" name="formNews"> <span></span> <input type="text" id="title" name="title" placeholder="¡Escribe el título de la noticia!"> <span></span> <textarea id="editor1" name="editor1"></textarea> <script> CKEDITOR.replace( 'editor1' ); </script> <input class="btn" type="submit" value="¡Lanzar Noticia!"> </form> </div> <article> <h1 style="text-align: center; padding: 10px">Noticias</h1> <div class="btn-container"> <input class="btn-add" type="submit" id="addNew" name="addNew" value="+ Agregar Noticia"> </div> <table> <tr> <td>Título</td> <td>Autor</td> <td>Fecha y Hora</td> <td>Acciones</td> </tr> <tr> <td>Título</td> <td>Autor</td> <td>Fecha y Hora</td> <td>Editar - Borrar</td> </tr> </table> </article> <?php include('../views/admin/footer.html'); ?> </body> </html>