# This example does an AJAX lookup and is in CoffeeScript
$('.typeahead').typeahead(
# source can be a function
source: (typeahead, query) ->
# this function receives the typeahead object and the query string
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
| /* | |
| * Based on https://gist.github.com/583836 from http://stackoverflow.com/questions/3709391/node-js-base64-encode-a-downloaded-image-for-use-in-data-uri. | |
| * Neither that gist nor this one work for me in 0.2.x or 0.3.x. | |
| */ | |
| var request = require('request'), | |
| BufferList = require('bufferlist').BufferList, | |
| sys = require('sys'), | |
| bl = new BufferList(), | |
| url = 'http://nodejs.org/logo.png' | |
| ; |
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> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> | |
| <title>Node-Link Tree</title> | |
| <script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.25.0"></script> | |
| <script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?1.25.0"></script> | |
| <style type="text/css"> | |
| circle.node { |
NewerOlder