Dokuwiki 和 Javascript
最近我看到一篇关于该用户的“Go Top”按钮的文章,该按钮使用 Jquery 并希望将其转换为 Mootools。我认为对于我正在编写的为该项目做出贡献的免费模板来说,这将是一个很好的功能。但不幸的是我这种类型的 javascript 不起作用。我知道jquery,我尝试了jquery中的代码,但没有工作。然后我把这段和平的代码转换为 mootools 并且不起作用...论坛没有太大帮助,因为没有答案...
window.addEvent('domready', function() {
$('gototop').setStyle('display','none');
((window.getScrollSize().y + 300 )> window.getSize().y) ? $('gototop').fade(1) : $('gototop').fade(0)
});
有谁知道 dokuwiki 使用哪种类型的语言来处理 javascript ???任何对该平台有更多经验的人都可以告诉我如何编写这个以便我可以与 dokuwiki 一起使用吗? 就像原始海报一样,我希望按钮隐藏,并且仅在用户将窗口滚动 300px 时才显示...如果不是,则应隐藏按钮。然后,如果用户没有激活 javascript,按钮应该始终打开...
Dokuwiki 有一个使用 jquery 的插件,但我更喜欢使用他的母语...
谢谢, 安娜
Recently I saw this post about a "Go Top" button of this user that uses Jquery and want it converted to Mootools. I think this would be a nice feature for the free templates I'm writting to contribute to the project. But unfortunately I this type of javascript is not working. I know jquery, I tried the code in jquery and didn't work. Then I took this peace of code converted to mootools and is not working to... The forums aren't a big help because there's no answer...
window.addEvent('domready', function() {
$('gototop').setStyle('display','none');
((window.getScrollSize().y + 300 )> window.getSize().y) ? $('gototop').fade(1) : $('gototop').fade(0)
});
Does anyone know which type of language dokuwiki uses to javascript??? Can anyone with more experience with the platform show me how to write this so I can use with dokuwiki?
Like the original poster I want the button to by hidden and show only if the user scrolls the window 300px...if not the button should be hidden. Then if the user doesn't have javascript activated the button should be always on...
Dokuwiki has a plugin to use jquery but I prefer use his native language...
Thanks,
Ana
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Dokuwiki 使用 jQuery。但你必须使用“jQuery”而不是默认的“$”
此外,DokuWiki 已经放弃了旧的 js 框架,现在只使用 jquery 来处理所有事情(这一举措将持续下去)。你可以看看 https://github.com/piyushmishra /dokuwiki-extension-manager/blob/master/script.js 以更好地了解如何进行操作。以及 http://www.dokuwiki.org/devel:javascript
Dokuwiki uses jQuery. but you have to use 'jQuery' and not the default '$'
Also DokuWiki has moved away from the old js framework and its now using jquery only for everything (the move is till going on). you can have a look at https://github.com/piyushmishra/dokuwiki-extension-manager/blob/master/script.js for better idea of how to go about it. and also at http://www.dokuwiki.org/devel:javascript