1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <script type="text/javascript" src="../build/jsMotif.js"></script>
-
- <title>jsMotif example</title>
- </head>
- <body>
- <div id="placeHolder">
-
- </div>
- <div id="template" style="display:none">
- <ul each="{results}">
- <li>
- <label>from: </label><span fill={from_user}></span><br>
- <em fill={text}></em>
- </li>
- </ul>
- </div>
-
- <script type="text/javascript">
-
- var tpl = new jsMotif.Template({
- template: 'template',
- targetNode: 'placeHolder'
- });
- //JSONP (cross domain) request, use reqType: 'jsonp' and use {CB_FN} in the url to mark place where callback function name should be placed
- tpl.renderJSON('http://search.twitter.com/search.json?q=Javascript&result_type=mixed&callback={CB_FN}',
- {
- reqType: 'jsonp',
- timeout: 5000
- });
-
-
-
- </script>
-
- </body>
- </html>
|