将JS代码转换为JSNI

时间:2015-03-06 20:14:38

标签: javascript jsni

我是JS和JSNI的新手。我不清楚那些$ wnd和$ doc。 例如我在JS中有这个功能:我怎么能把它转换成JSNI? 试图将文档更改为$ doc,因为它代表doc ..但它不起作用。

function homeHelp(){
    var intro = introJs();
      intro.setOptions({
        steps: [
          {
            element: document.querySelector('#left_side_block'),
            intro: "This is a tooltip.",
            position:'right'
          },
          {
            element: document.querySelectorAll('#right_side_block')[0],
            intro: "Ok, wasn't that fun?",
            position: 'right'
          },
          {
            element: '#step3',
            intro: 'More features, more fun.',
            position: 'left'
          },
          {
            element: '#step4',
            intro: "Another step.",
            position: 'bottom'
          },
          {
            element: '#step5',
            intro: 'Get it, use it.'
          }
        ]
      });

      intro.start();
}

0 个答案:

没有答案
相关问题