SyntaxError: missing } after function body, one server good, live server fail

SyntaxError: missing } after function body, one server good, live server fail

我不知道发生了什么,我有这个暂存站点 http://eggsfruits.techqueb.com/midi.php were i did put tabs code and javascript. It is doing the process A1, when i upload my file to my live server http://www.eggsfruits.ca/midi.php 选项卡不再工作,我收到错误消息

SyntaxError: missing } after function body

你能帮我找到我的问题吗

你的脚本

jQuery(document).ready(function() {jQuery('.tabs .tab-links a').on('click', function(e){var currentAttrValue = jQuery(this).attr('href');// Show/Hide Tabs jQuery('.tabs ' + currentAttrValue).show().siblings().hide(); // Change/remove current tab to active jQuery(this).parent('li').addClass('active').siblings().removeClass('active'); e.preventDefault(); });

如您所见,您没有关闭该功能是因为您推荐了它

所以我认为您的代码应该是这样的:

jQuery(document).ready(function() {jQuery('.tabs .tab-links a').on('click', function(e){var currentAttrValue = jQuery(this).attr('href'); });// Show/Hide Tabs jQuery('.tabs ' + currentAttrValue).show().siblings().hide(); // Change/remove current tab to active jQuery(this).parent('li').addClass('active').siblings().removeClass('active'); e.preventDefault();