This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $(function() { | |
| $('.login_button').click(function() { | |
| doLogin(); | |
| }); | |
| $('#send_chat_form').submit(function() { | |
| var message = $(this).find('.message').val(); | |
| sendMsg(message); | |
| $('#chat').append('<div class="msg">me: ' + message + '</div>'); | |
| $(this).find(".message").val(''); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // enqueue these scripts and styles before admin_head | |
| wp_enqueue_script( 'jquery-ui-dialog' ); // jquery and jquery-ui should be dependencies, didn't check though... | |
| wp_enqueue_style( 'wp-jquery-ui-dialog' ); | |
| ?> | |
| <!-- The modal / dialog box, hidden somewhere near the footer --> | |
| <div id="my-dialog" class="hidden" style="max-width:800px"> | |
| <h3>Dialog content</h3> | |
| <p>This is some terribly exciting content inside this dialog. Don't you agree?</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function toJSON(node) { | |
| node = node || this; | |
| var obj = { | |
| nodeType: node.nodeType | |
| }; | |
| if (node.tagName) { | |
| obj.tagName = node.tagName.toLowerCase(); | |
| } else | |
| if (node.nodeName) { | |
| obj.nodeName = node.nodeName; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function elementToObject(element, o) { | |
| var el = $(element); | |
| var o = { | |
| tagName: el.tagName | |
| }; | |
| var i = 0; | |
| for (i ; i < el.attributes.length; i++) { | |
| o[el.attributes[i].name] = el.attributes[i].value; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <!-- | |
| Stuart Powers | |
| http://sente.cc/ | |
| http://twitter.com/stuartpowers | |
| --> | |
| <html> | |
| <head> |