问题是当搜索页面打开时,所有链接都处于非活动状态。所以,我发现问题来形成这个jQuery代码:如果我添加//返回false返回false - 阻止页面上的所有链接
var shouldShow = $.cookie('show_desc') == 'yep';
if(shouldShow) { $('#searchunder').show(); $('body').animate({ paddingTop: 80 }); }
else { $('#searchunder').hide(); $('body').animate({ paddingTop: 25 }); }
// shows the group_desciption on clicking the noted link
$('#search').click(function() {
$('body').animate({ paddingTop: 80 });
$('#searchunder').show('fast');
$.cookie('show_desc', 'yep');
return false;
});
// hides the group_desciption on clicking the noted link
$('#close').click(function() {
$('body').animate({ paddingTop: 25 });
$('#searchunder').hide('fast');
$.cookie('show_desc', 'nope');
return false;
});
;链接正在工作。但如果我删除返回false;我的搜索栏正在隐藏,然后再次打开。那么解决方案是什么?
你能提供的jsfiddle? –
什么是HTML结构? –
在小提琴中,它会工作得很好......问题在于prestashop搜索页面,因为它使用AJAX和其他JS代码。所以这一些如何得到CONFLICT。但是,如果删除RETURN FALSE,除了隐藏和显示功能之外,它会变得很好。 – AndrewS