好的,我有一个jQuery,我已经在静态html页面中测试过了,它运行得很好。
我如何在插件中包含jQuery来处理wordpress?
这就是html页面。
<head>
<title> Welcome to my page</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/ui-lightness/jquery-ui-1.8.17.custom.css">
</head>
<body>
<a id="word" href="#">Google</a>
<span id="hoovertext"> a powerful search engine</span>
</div>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/hide.js"></script>
<script type="text/javascript" src="js/jquery-ui.js"></script>
</body>
这是适用于此html页面的jQuery文件$(\'a\').mousemove(function(){
$(\'#hoovertext\').show();
});
$(\'#hoovertext\').mouseleave(function(){
$(this).fadeOut();
});
基本上,我希望这个jQuery能够处理wordpress网站上的特定单词。。在某种意义上,当有人将鼠标悬停在文本上时,它会给出一个描述。正是我上面的代码所做的。有人能告诉我怎么做吗,因为我在wordpress中包含jQuery是我仍然不太理解的一件事。
谢谢