Jump to content

Lightbox Uncaught SyntaxError: Unexpected token {


Mudsaf

Recommended Posts

Hello, i'm wondering what could be wrong when i add lightbox plugin to my website.

 

On this code below

/* Preload images */body:after {content:url(../img/close.png) url(../img/loading.gif) url(../img/prev.png) url(../img/next.png);  display: none;}

It will give error "Uncaught SyntaxError: Unexpected token { " which refers to body:after { part.

Link to comment
Share on other sites

It might be because you forgot to close a ruleset further back in the document. Though since it's lightbox I'd expect they wouldn't have errors in it. I can't really know why it's not working.

 

Maybe a live example would help.

Link to comment
Share on other sites

I guess you're talking about the link that says "Diablo 3 Progress #1".

 

I'm getting a 403 forbidden error. Your server is blocking access to the image. Lightbox isn't reacting at all.

Link to comment
Share on other sites

403 forbidden should be fixed now.

<a data-lightbox="d3-progress" href="http://mudsaf.info/admin/files/public/20140902_203326-4b0250793549726d5c1ea3906726ebfe-bounty_chest.jpg">Diablo 3 Progress #1</a>

http://lokeshdhakar.com/projects/lightbox2/ <-- I'm using this.

Link to comment
Share on other sites

You misspelled "stylesheet" here:

<link rel='styleshee' type='text/css' src='../plugins/lightbox/css/lightbox.css'/>

I can't be certain that it's the only factor involved. When I click the link nothing happens at all which seems more like a Javascript problem than CSS.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...