File: dataFrame.html

package info (click to toggle)
jquery-at.js 1.5.4%2Bdfsg.1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 312 kB
  • sloc: makefile: 72
file content (30 lines) | stat: -rw-r--r-- 1,079 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE html>
<html>
<head>
  <title>Data Iframe</title>
  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
  <script type="text/javascript" src="http://ichord.github.io/Caret.js/src/jquery.caret.js"></script>
  <script type="text/javascript" src="../../dist/js/jquery.atwho.js"></script>
  <script type="text/javascript">
    $(function(){
      var names = ["Jacob","Isabella","Ethan","Emma","Michael","Olivia","Alexander","Sophia","William","Ava","Joshua","Emily","Daniel","Madison","Jayden","Abigail","Noah","Chloe","你好","你你你"];

      var names = $.map(names,function(value,i) {
        return {'id':i,'name':value,'email':value+"@email.com"};
      });

      viewFrame = parent.frames.viewFrame
      var at_config = {
        at: "@",
        data: names,
        displayTpl: "<li>${name} <small>${email}</small></li>"
      }
      $(viewFrame.document.body)
        .atwho('setIframe', viewFrame.frameElement, true)
        .atwho(at_config);
    });
  </script>
</head>
<body>
</body>
</html>