diff options
-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); |