- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我明白了,
点击“否”表示页面显示完美。
它指的是jquery1.4.2.js的这一部分:
// Get the Nth element in the matched element set OR
// Get the whole matched element set as a clean array
get: function( num ) {
return num == null ?
// Return a 'clean' array
this.toArray() :
// Return just the object
( num < 0 ? this.slice(num)[ 0 ] : this[ num ] );
},
我假设我在我的一个 js 文件中某处调用了错误的上下文(这将是一个真正的查找任务)。
标准 IE8 用户会遇到此错误吗?
(我想 ms 很难重新安装 ie!)
我的javascript:
var IE = /*@cc_on!@*/false;
//DOCUMENT.READY EVENTS
//---------------------------------------------------------------------------
$(window).ready(function(){
// mark events as not loaded
$('.event').data({
t1_loaded: false,
t2_loaded: false,
t3_loaded: false,
art_req: false
});
//mark no events have been clicked
$('#wrap_right').data('first_click_made', false);
//TAB CLICK -> AJAX LOAD TAB
$('#wrap_right .rs_tabs li').live('click', function(){
var id = $('#wrap_right').data('curr_event');
var tab = parseInt($(this).attr('rel'));
do_tab(id, tab);
})
// cal-block event click
$('#cal_blocks div.event, #main_search div.event').live('click', function(){
var id = $(this).attr('id').split('e')[1];
window.location.hash = id;
});
// jq history
$.historyInit(function(hash){
if(hash){event_load(hash);}
});
// search
$('#search_input').typeWatch
({
callback: function(){
var q = $('#search_input').attr('value');
search(q);
},
wait : 350,
highlight : false,
captureLength : 2
});
$('#search_input, #main_search div.close').live('click',function(){
$(this).attr("value","");
reset_srch_res();
});
$('#main_search').easydrag();
$('a.dialog').colorbox();
//artist names in event desc -> scroll
$('#wrap_right .art_link').live('click', function(){
var art_id = $(this).attr('rel');
var id = $('#wrap_right').data('curr_event');
$('#e'+id).data('art_req', art_id);
$('#rs_'+id+' .t2').click();
});
});
// FUNCTIONS
//---------------------------------------------------------------------------
function event_load(id){
console.log('function called: event_load');
//mark current event
$('#wrap_right').data('curr_event', id);
//hide any other events
if($('#wrap_right').data('first_click_made') === true)
{
$('#wrap_right .event_rs').hide();
}
//frame loaded before?
var loaded = $('#e'+id).data('t1_loaded');
if(loaded === true) {
$('#rs_'+id).show();
}
else {
create_frame(id);
}
//open/load the first tab
$('#rs_'+id+' .t1').click();
$('#cal_blocks').scrollTo('#e'+id, 1000, {offset: {top:-220, left:0}});
}
function create_frame(id){
console.log('function called: create_frame');
var art = ents[id].art;
var ven = ents[id].ven;
var type = ents[id].gig_club;
var nn = ents[id].nn;
var ven_add = ents[id].venue;
//select colours for tabs
if(type == 1){ var label = 'gig';}
else if(type == 2){ var label = 'club';}
else if(type == 0){ var label = 'other';}
//create rs container for this event
var frame = '<div id="rs_'+id+'" class="event_rs">';
frame += '<div class="title_strip">';
frame += '<p class="rs_nn hf_font">'+nn+'</p><p class="rs_ven">'+ven_add+'</p>';
frame += '</div>';
frame += '<div class="rs_tabs"><ul class="'+label+'"><li class="t1 nav_tab1 curr_tab hand" rel="1"></li>';
if(art == 1){frame += '<li class="t2 nav_tab2 hand" rel="2"></li>';}
if(ven == 1){frame += '<li class="t3 nav_tab2 hand" rel="3"></li>';}
frame += '</ul></div>';
frame += '<div id="rs_content"><div class="tab_body tab1" ></div>';
if(art == 1){frame += '<div class="tab_body tab2"></div>';}
if(ven == 1){frame += '<div class="tab_body tab3"></div>';}
frame += '</div>';
frame += '</div>';
$('#wrap_right').append(frame);
};
//load or show required tab
function do_tab(id, tab){
console.log('function called: do_tab');
//hide other tabs
$('#rs_'+id+' .tab_body').hide();
//mark current(clicked) tab
$('#rs_'+id+' .rs_tabs li').removeClass('curr_tab');
$('#rs_'+id+' .rs_tabs .t'+tab).addClass('curr_tab');
//is the tab already loaded and hidden?
var loaded = $('#e'+id).data('t'+tab+'_loaded');
if(loaded === true)
{
$('#rs_'+id+' .tab'+tab).show();
if (tab == 2) { art_requested(id); }
}
else
{
//ajax load in the tab
$('#rs_'+id+' .tab'+tab).load('index_files/tab'+tab+'.php?id='+id, function(){
//after load callback
if (tab == 1)
{ setup_tab_1(id); }
if (tab == 2) { setup_tab_2(id); }
});
//mark tab as loaded
$('#e'+id).data('t'+tab+'_loaded', true);
//fade in current tab
$('#rs_'+id+' .tab'+tab).fadeIn(600);
}
}
//mark current event in cal-blocks
function mark_current(id){
console.log('function called: mark_current');
$('#cal_blocks .event_sel').removeClass('event_sel');
$('#e'+id).addClass('event_sel');
}
//setup tab 1
function setup_tab_1(id){
console.log('function called: setup_tab_1');
$('#rs_' + id + ' .frame').fadeIn(600);
var $img = $('#rs_'+id+' .event_img');
var rel = $img.attr('rel');
if (rel !== '')
{
$img.live('click', function(){
$.fn.colorbox({href: rel, overlayClose: true});
});
}
if($('#wrap_right').data('first_click_made') === false)
{
//$('#wrap_right').delay(500).slideDown();
//$('#rs_'+id+' .rs_tabs').delay(800).fadeIn(600);
load_fb_js();
$('#wrap_right').data('first_click_made', true);
}
mark_current(id);
}
//setup tab 2
function setup_tab_2(id) {
console.log('function called: setup_tab_2');
art_requested(id);
$('#rs_'+id+' #art_scrollable').scrollable({
size: 1,
easing: 'swing',
clickable: false,
onBeforeSeek: function(){before();},
onSeek: function(){after();}
}).navigator("#art_scroll_nav");
prep_media_carousel();
}
//check to see if an artist has been requested
function art_requested(id){
console.log('function called: art_requested');
var art_req = $('#e'+id).data('art_req');
if(art_req !== false)
{
$('#art_'+art_req).click();
}
}
//scroll artist panes smoothly (scroll bars cause glitches otherwise)
function before (){
if(!IE){$('#art_scrollable .bio_etc').css('overflow','-moz-scrollbars-none');}
}
function after (){
if(!IE){$('#art_scrollable .bio_etc').css('overflow','auto');}
}
// MEDIA CAROUSEL
//--------------------------
function prep_media_carousel(){
console.log('function called: prep_media_carousel');
//youtube and soundcloud player
$("#rs_content .yt_scrollable a.yt, #rs_content .yt_scrollable a.sc").colorbox({
overlayClose : false,
opacity : 0
});
$("#colorbox").easydrag(true);
$('#cboxOverlay').remove();
}
function make_carousel_scrollable(unique_id){
console.log('function called: make_carousel_scrollable');
$('#scroll_'+unique_id).scrollable({
size:1,
clickable:false,
nextPage:'#r_'+unique_id,
prevPage:'#l_'+unique_id
});
}
function check_l_r_arrows(total, counter, art_id){
console.log('function called: check_l_r_arrows');
//left arrow
if(counter > 0)
{
$('#l_'+art_id).show();
$('#l_'+art_id+'_inactive').hide();
}
else
{
$('#l_'+art_id).hide();
$('#l_'+art_id+'_inactive').show();
}
//right arrow
if(counter < total-3)
{
$('#r_'+art_id).show();
$('#r_'+art_id+'_inactive').hide();
}
else
{
$('#r_'+art_id).hide();
$('#r_'+art_id+'_inactive').show();
}
}
//load facebook scripts
function load_fb_js(){
console.log('function called: load_fb_js');
$.getScript('http://static.ak.connect.facebook.com/connect.php/en_GB', function(){
//callback
FB.init("89bb37189bede9e30eb07a66b9a1c52a");
});
}
// SEARCH
//---------------------------------------------------------------------------
function reset_srch_res(){
$('#main_search').fadeOut(400).children().remove();
}
function search(q){
console.log('function called: search');
$.ajax({
type: 'GET',
url: 'index_files/srch/search.php?q='+q,
success: function(e)
{
$('#main_search').html(e).show();
}
});
}
最佳答案
他们会在底部看到一个黄色的小图标,否则他们会看到你所看到的,这取决于浏览器的设置方式。我怀疑,在某种程度上,您的页面并非没有缺陷。您应该能够使用开发人员工具来检查堆栈跟踪并找出代码中发生错误的位置。或者,您可以用 try/catch block 将代码括起来,并以这种方式找出错误。
[edit] 这是浏览器在左下角显示的内容:
(来源:gutfullofbeer.net)
双击它会弹出与您看到的相同的错误对话框。
关于javascript - 停止脚本调试错误对话框出现在 ie8 中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2566421/
我的应用程序从一个有 5 个选项卡的选项卡栏 Controller 开始。一开始,第一个出现了它的名字,但其他四个没有名字,直到我点击它们。然后根据用户使用的语言显示名称。如何在选项卡栏出现之前设置选
我有嵌套数组 json 对象(第 1 层、第 2 层和第 3 层)。我的问题是数据表没有出现。任何相关的 CDN 均已导入。该表仅显示部分。我引用了很多网站,但都没有解决我的问题。 之前我使用标准表来
我正在尝试设置要显示的 Parse PFLoginViewController。这是我的一个 View Controller 的类。 import UIKit import Parse import
我遇到了这个问题,我绘制的对象没有出现在 GUI 中。我知道它正在被处理,因为数据被推送到日志文件。但是,图形没有出现。 这是我的一些代码: public static void main(Strin
我有一个树状图,其中包含出现这样的词...... TreeMap occurrence = new TreeMap (); 字符串 = 单词 整数 = 出现次数。 我如何获得最大出现次数 - 整数,
因此,我提示用户输入变量。如果变量小于 0 且大于 10。如果用户输入 10,我想要求用户再次输入数字。我问时间的时候输入4,它说你输入错误。但在第二次尝试时效果很好。例如:如果我输入 25,它会打印
我已经用 css overflow 属性做了一个例子。在这个例子中我遇到了一个溢出滚动的问题。滚动条出现了,但没有工作意味着每当将光标移动到滚动条时,在这个滚动条不活动的时间。我对此一无所知,所以请帮
我现在正在做一个元素。当您单击一个元素时,会出现以下信息,我想知道如何在您单击下一个元素而不重新单击同一元素时使其消失....例如,我的元素中有披萨,我想单击肉披萨看到浇头然后点击奶酪披萨看到浇头和肉
我有一个路由器模块,它将主题与正则表达式进行比较,并将出现的事件与一致的键掩码链接起来。 (它是一个简单的 url 路由过滤,如 symfony http://symfony.com/doc/curr
这个问题在这里已经有了答案: 9年前关闭。 Possible Duplicate: mysql_fetch_array() expects parameter 1 to be resource, bo
我在底部有一个带有工具栏的 View ,我正在使用 NavigationLink 导航到该 View 。但是当 View 出现时,工具栏显示得有点太低了。大约半秒钟后,它突然跳到位。它只会在应用程序启
我试图在我的应用程序上为背景音乐添加一个 AVAudioPlayer,我正在主屏幕上启动播放器,尝试在应用程序打开时开始播放但出现意外行为... 它播放并立即不断创建新玩家并播放这些玩家,因此同时播放
这是获取一个数字,获取其阶乘并将其加倍,但是由于基本情况,如果您输入 0,它会给出 2 作为答案,因此为了绕过它,我使用了 if 语句,但收到错误输入“if”时解析错误。如果你们能提供帮助,我真的很感
暂停期间抛出异常 android.os.DeadObjectException 在 android.os.BinderProxy.transactNative( native 方法) 在 androi
我已经为猜词游戏编写了一些代码。它从用户输入中读取字符并在单词中搜索该字符;根据字符是否在单词中,程序返回并控制一些变量。 代码如下: import java.util.Random; import
我是自动化领域的新手。这是我的简单 TestNG 登录代码,当我以 TestNG 身份运行该代码时,它会出现 java.lang.NullPointerException,双击它会突出显示我导航到 U
我是c#程序员,我习惯了c#的封装语法和其他东西。但是现在,由于某些原因,我应该用java写一些东西,我现在正在练习java一天!我要创建一个为我自己创建一个虚拟项目,以便让自己更熟悉 Java 的
我正在使用 Intellij,我的源类是 main.com.coding,我的资源文件是 main.com.testing。我将 spring.xml 文件放入资源文件中。 我的测试类位于 test.
我想要我的tests folder separate到我的应用程序代码。我的项目结构是这样的 myproject/ myproject/ myproject.py moduleon
这个问题已经有答案了: What is a NullPointerException, and how do I fix it? (12 个回答) 已关闭 6 年前。 因此,我尝试比较 2 个值,一个
我是一名优秀的程序员,十分优秀!