This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| /* | |
| * jqModal - Minimalist Modaling with jQuery | |
| * http://dev.iceburg.net/jquery/jqModal/ | |
| * Copyright (c) 2007 Brice Burgess <[email protected]>, http://www.iceburg.net | |
| * Licensed under the MIT License: | |
| * http://www.opensource.org/licenses/mit-license.php | |
| * | |
| * $Version: 2007.08.17 +r11 | |
| * | |
| */ |
| jsfunction({ | |
| "jquery": { | |
| "website": "http://jquery.com", | |
| "versions": [ | |
| { "version": "1.5", "releaseDate": "January 1, 2011" }, | |
| { "version": "1.5.1", "releaseDate": "February 1, 2011" }, | |
| { "version": "1.5.2", "releaseDate": "March 1, 2011" }, | |
| { "version": "1.6", "releaseDate": "April 1, 2011" } | |
| ] | |
| } |
| var link = { | |
| href: "", | |
| _url: function() { | |
| var key = "/download.axd/"; | |
| return this.href.substr(key.length); | |
| }, | |
| extension: function() { | |
| return this._url().substr(33, 3); | |
| }, | |
| filename: function() { |
| //dynamically generated by ASP.NET for the language passed in. | |
| var labels = { | |
| language: 'English', | |
| objectOverlay: { | |
| closeX: 'Close X', | |
| fallback: 'Video for {vid}' | |
| }, | |
| global: { | |
| label1: 'label1', | |
| label2: 'label2' |
| //dynamically generated by ASP.NET for the language passed in. | |
| var globalLabel = { | |
| language: 'English', | |
| labels: { | |
| objectOverlay: { | |
| closeLabel: 'Close X', | |
| fallbackLabel: 'Video for {vid}' | |
| } | |
| } | |
| }; |
| // Did you mean return false? | |
| // 'return false' stops the default behavior of the event | |
| // and prevents it from bubbling up DOM, which kills | |
| // event delegation and may not be what you indented. | |
| // Learn how these event methods can fine tune your | |
| // event handler functions. | |
| $("#clickme").click(function(e) { | |
| //Prevent the default click action from firing. |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset=utf-8 /> | |
| <title>TalkAbstracts</title> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
| <script src="http://github.com/nje/jquery-tmpl/raw/master/jquery.tmpl.js"></script> | |
| <script type="text/javascript"> | |
| $(function() { | |
| $.ajax({ |
| function rgbToHex(rgb) { | |
| if (rgb.match(/^#[0-9A-Fa-f]{6}$/)) { | |
| return rgb; | |
| } | |
| var rgbvals = /rgb\((.+),(.+),(.+)\)/i.exec(rgb); | |
| if (!rgbvals) { | |
| return rgb; | |
| } | |
| var rval = parseInt(rgbvals[1]); | |
| var gval = parseInt(rgbvals[2]); |
| $.fx.speeds.SlowAsFatCat = 10000; |