JSFiddle - React, Tailwind, and code Playground

by Nick Craver

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/dot-luv/jquery-ui.css">
<button class="add">Adicionar Not&iacute;cia</button>
<div class="addContent" title="Adicionar Not&iacute;cia">
    <form id="news" name="news" method="post">
        <textarea name="news"></textarea>
    </form>
</div>

JavaScript

$(function() {
    $("button").button();

    $(".addContent").dialog({
        autoOpen: false,
        show: { effect: 'slide', complete: function() { $("textarea").first().focus(); } },
        hide: 'drop',
        resizable: false,
        width: 500,
        height: 500,
        buttons: { 'Publicar' : function() { alert($(this).find('textarea').val()+"ae"); } }
    });

    // Event listener for adding content to the site (will open up in a dialog)
    $('button.add').live('click', function() {
        $(".addContent").dialog('open');
    });
});