This example showcases how to have an ‘onload’ function fire off for HTML <img> elements who are already loading in the HTML DOM.
Notice that the src is set to an empty string, the onload function is set, then the src is reset.
| <!DOCTYPE html> | |
| <head> | |
| <title>Example</title> | |
| <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
| </head> | |
| <body> | |
| <section class="what"> | |
| <div class="awesome"> | |
| <div class="classnames"> |
| /* http://meyerweb.com/eric/tools/css/reset/ | |
| v2.0-modified | 20110126 | |
| License: none (public domain) | |
| */ | |
| html, body, div, span, applet, object, iframe, | |
| h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
| a, abbr, acronym, address, big, cite, code, | |
| del, dfn, em, img, ins, kbd, q, s, samp, | |
| small, strike, strong, sub, sup, tt, var, |
| (function (document) { | |
| ArrayForEach = Array.prototype.forEach || function (callback, scope) { for (var i = 0, l = this.length; i < l; ++i) callback.call(scope, this[i], i, this); }; | |
| function updateElements() { | |
| var skip = document.hidden || document.mozHidden || document.msHidden || document.oHidden || document.webkitHidden || !document.hasFocus || document.hasFocus(); | |
| ArrayForEach.call(document.querySelectorAll("html,link[rel],script[src]"), function (element) { | |
| if (skip) { | |
| return; | |
| } |
| { | |
| // Calculates indentation automatically when pressing enter | |
| "auto_indent": true, | |
| // These files will still show up in the side bar, but won't be included in | |
| // Goto Anything or Find in Files | |
| "binary_file_patterns": [ | |
| "*.jpg", "*.jpeg", "*.png", "*.gif", "*.ttf", "*.tga", "*.dds", "*.ico", "*.eot", "*.pdf", "*.swf", "*.jar", "*.zip" | |
| ], |
This example showcases how to have an ‘onload’ function fire off for HTML <img> elements who are already loading in the HTML DOM.
Notice that the src is set to an empty string, the onload function is set, then the src is reset.
| .-----------------------------------------------------------------------. | |
| | | | |
| | Screen VT100/ANSI Terminal Emulator | | |
| | Default Keyboard Shortcut | | |
| | Cheat Sheet | | |
| | | | |
| '-----------------------------------------------------------------------' | |
| | Peteris Krumins (peter@catonmat.net), 2007.09.21 | | |
| | http://www.catonmat.net - good coders code, great reuse | | |
| '-----------------------------------------------------------------------' |
| { | |
| "auto_indent": true, | |
| "color_scheme": "Packages/Color Scheme - Default/Sunburst.tmTheme", | |
| "ensure_newline_at_eof_on_save": true, | |
| "font_face": "Monaco", | |
| "font_size": 11, | |
| "highlight_line": true, | |
| "tab_size": 3, | |
| "translate_tabs_to_spaces": true, | |
| "trim_automatic_white_space": true, |
| [2010-11-18: REVISION 1623] | |
| [FIXED] Java bundle’s Compile & Run again works with non-ASCII source code. | |
| [FIXED] Include latest Ruby on Rails bundle. | |
| [FIXED] Avoid using fcntl(F_SETOWN) when Interactive Input is not present. Ticket F66289D9. | |
| [NEW] It is possible to set DisableColumnSelectionTogglingOnOption (via defaults write) to disable ⌥ behavior. Ticket 5C202273. |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>Single and Double Click</title> | |
| <link rel="stylesheet" type="text/css" href="style.css"> | |
| </head> | |
| <body> | |
| <div id="the_div"></div> | |
| <span>Double click the block</span> |