简体   繁体   English

Salvattore无法在Chrome和Safari上运行

[英]Salvattore not working on Chrome and Safari

I don't understand what is going on here. 我不明白这里发生了什么。 I made a website, everything works except Salvattore.js. 我做了一个网站,除了Salvattore.js之外,其他所有东西都可以正常工作。 It works perfect on IE and Firefox but don't work at all on Safari and Chrome! 它在IE和Firefox上可以完美运行,但在Safari和Chrome上根本无法运行! (see images below of the same element inspected on Firefox and on Chrome. Chrome doesn't even recognize the html structure inside of the div timeline (salvattore) !!) (请参见下面在Firefox和Chrome上检查过的同一元素的图像。Chrome甚至无法识别div时间线(salvattore)内的html结构!)

I have tried to remove isotope to see if both plugins were having a conflict with each other but it didn't work neither. 我试图删除同位素,以查看两个插件是否相互冲突,但两者均无效。

If the code would be wrong then it shouldn't work at all on any browser, right? 如果代码错误,那么它根本不能在任何浏览器上运行,对吗? I don't understand what could possibly be wrong?! 我不明白什么可能是错的?!

UPDATE I got this error when inspecting: 更新我检查时收到此错误:

"Uncaught TypeError: Cannot read property '1' of null salvattore.js:196 “未捕获的TypeError:无法读取null salvattore.js的属性'1':196

obtain_grid_settings salvattore.js:196
add_columns salvattore.js:214
register_grid salvattore.js:488
init salvattore.js:498
(anonymous function) salvattore.js:503
(anonymous function) salvattore.js:511
(anonymous function) salvattore.js:9
(anonymous function)

"

How can I correct it? 我该如何纠正?

Test URL: http://lfsolutions.se/testes/site_2_B_teste/referenser.php#simple2 测试网址: http : //lfsolutions.se/testes/site_2_B_teste/referenser.php#simple2

Attached images: 所附图片:

在此处输入图片说明在此处输入图片说明

Salvatore DOES run on Chrome, test this jsfiddle with Chrome. Salvatore DOES在Chrome上运行,请在Chrome上测试此jsfiddle You probalby have some custom code that is causing the trouble. 您的probalby有一些导致问题的自定义代码。

The code is from the main page of Salvattore.js. 该代码来自Salvattore.js主页。

CSS CSS

#grid[data-columns]::before {
    content: '3 .column.size-1of3';
}

/* These are the classes that are going to be applied: */
.column { float: left; }
.size-1of3 { width: 33.333%; }


@media screen and (max-width: 480px){
    #grid[data-columns]::before {
        content: '1 .column.size-1of1';
    }
}

@media screen and (min-width: 481px) and (max-width: 768px) {
    #grid[data-columns]::before {
        content: '2 .column.size-1of2';
    }
}
@media screen and (min-width: 769px) {
    #grid[data-columns]::before {
        content: '3 .column.size-1of3';
    }
}

/* Again, you’re free to use and define the classes: */
.column { float: left; }
.size-1of1 { width: 100%; }
.size-1of2 { width: 50%; }
.size-1of3 { width: 33.333%; }

UPDATE: I don't know if you're running salvattore.js on a localhost or nut, but it completely fails to run for me on LAMP. 更新:我不知道您是在本地主机还是在螺母上运行salvattore.js,但是对于我来说,它完全无法在LAMP上运行。

OK, after a lot of trying and testing I found out that Salvattore works fine on all browsers if I take it out of the tabs. 好吧,经过大量的尝试和测试,我发现,如果我从选项卡中删除Salvattore,则在所有浏览器上都可以正常工作。 So now the question is: How do I make it work inside of tabs? 所以现在的问题是:如何使它在选项卡中起作用?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM