Mudsaf Posted November 2, 2014 Share Posted November 2, 2014 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 More sharing options...
Ingolme Posted November 2, 2014 Share Posted November 2, 2014 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 More sharing options...
Mudsaf Posted November 2, 2014 Author Share Posted November 2, 2014 http://mudsaf.info/ At mainpage you can see the error via inspect element. Link to comment Share on other sites More sharing options...
Mudsaf Posted November 2, 2014 Author Share Posted November 2, 2014 Wondering if the problem can be that i use jQuery 2.x.x and lightbox uses 1.11.0 Link to comment Share on other sites More sharing options...
Ingolme Posted November 2, 2014 Share Posted November 2, 2014 You used a <script> tag to include a CSS document. The browser is trying to read that as Javascript. Link to comment Share on other sites More sharing options...
Mudsaf Posted November 2, 2014 Author Share Posted November 2, 2014 ah facepalm Link to comment Share on other sites More sharing options...
Mudsaf Posted November 2, 2014 Author Share Posted November 2, 2014 Do you have any idea how to fix the lightbox. It just expands the page at bottom without displaying the picture. http://mudsaf.info/ (2nd latest topic) Link to comment Share on other sites More sharing options...
Ingolme Posted November 2, 2014 Share Posted November 2, 2014 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 More sharing options...
Mudsaf Posted November 3, 2014 Author Share Posted November 3, 2014 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 More sharing options...
Ingolme Posted November 3, 2014 Share Posted November 3, 2014 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now