所以即时通讯尝试应用基本的点击显示隐藏元素,但由于某种原因它不起作用
即时通过外部javascript文件使用它,并包括我的母版页面中包含的最新jquery库firebug显示代码所以我知道它捡起它
继承了我试过的代码
$(document).ready(function () {
// hides the divx as soon as the DOM is ready
$('#ecom').hide();
// shows the div on clicking the noted link
$('.eco').click(function () {
$('#ecom').show('slow');
return false;
});
// hides the div on clicking the noted link
$('.eco').click(function () {
$('#ecom').hide('fast');
return false;
});
});
Run Code Online (Sandbox Code Playgroud)
HTML
<h2 class="eco">Ecommerce Web Design</h2>
<div id="ecom">content</div>
Run Code Online (Sandbox Code Playgroud)
我自己也没有看到这个问题
这是我最终使用的解决方案做我想要它做的:) 谢谢你们所有的答案
$(document).ready(function () {
$('#ecom').hide();
$('.eco').click(function () {
$('#ecom').toggle('slow');
return false;
});
Run Code Online (Sandbox Code Playgroud)