简体   繁体   中英

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. It works perfect on IE and Firefox but don't work at all on Safari and 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) !!)

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

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

Attached images:

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

Salvatore DOES run on Chrome, test this jsfiddle with Chrome. You probalby have some custom code that is causing the trouble.

The code is from the main page of Salvattore.js.

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.

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. So now the question is: How do I make it work inside of tabs?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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