diff options
author | emkael <emkael@tlen.pl> | 2015-12-01 15:31:12 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2015-12-01 15:31:12 +0100 |
commit | 929cb900dc7b6b0ea0df3e888f18ddb3ec0527f1 (patch) | |
tree | e0b4604e64823e030f93bf5f54f7de845411ea7c /main.js | |
parent | 18f41d446b35844bbaa8788ab83fd271ca2e46fe (diff) |
Diffstat (limited to 'main.js')
-rw-r--r-- | main.js | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -432,7 +432,16 @@ 'border': 'solid 2px white', 'border-radius': '5px' }); - balloon.append(JSON.stringify(candidateNode).replace(/,/g, ',<br />')); + balloon.append($('<h1>').text(candidateNode.data.name)); + if (!candidateNode.data.main) { + var switchLink = $('<a>').attr({ + 'href': '#', + 'data-link': candidateNode.name + }); + switchLink.text('[go!]'); + switchLink.click(switchContext); + balloon.append(switchLink); + } balloon.hide(); $('body').append(balloon); balloon.data('node', candidateNode); |