Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.get('/', function(req, res) {
- res.render('search.ejs', {
- json: myJsonString,
- links: links,
- titles: titles,
- domain: domain
- });
- <script type="text/javascript">
- function codeAddress() {
- var data = <%- json %>;
- document.write('<ul>');
- for (var i = 0; i < data.length; i++) {
- document.write('<li><a href="">')
- document.write(data[i]);
- document.write('</li></a>')
- }
- document.write('</ul>');
- }
- codeAddress();
- </script>
- $('ul li a').live('click', function() {
- console.log($(this).index());
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement