June 7, 201313 yr Hi, this is more to do with lightbox, fancybox, slimbox etc... It seems rel doesn't validate in HTML5. (I'm using slimbox btw) I've replaced rel with class in the HTML and within the JS file. It is working fine, except the prev and next images and the image caption - not displaying at all. Has anyone had any issues with this before? Cheers. Al.
June 7, 201313 yr Author We are having issues with our hosting company (about 2 weeks now) and we haven't been able to connect to our sites through ftp, much, so I am working on it using Wamp. Just uploading it to my personal site now... (different hosting company)Here is a page using slimbox (still with the rel attribute in place)
June 7, 201313 yr Thanks, it would be easier to debug with an online example. You should be looking for if statements in the JS i'd imagine which is checking for a 'rel' attribute, and just replace it with the class.
June 7, 201313 yr Author I did a search for 'rel' in the JS and only found one that looked like it needed to be changed, which I did change but it caused the next, prev and image caption to stop working.
June 7, 201313 yr Oh, I've just realised, it's because when you're using a class, you're not defining the images as being part of a set (like you would normally doing rel="lightbox[coffee-and-cream]"). I'll see how this can be achieved using a class. Out of interest, why do you want to use a class instead of rel? Is it because you want to use it on something other than a link? Edited June 7, 201313 yr by Lyndsey
June 7, 201313 yr You could use the data attribute instead of classhere's a link to a solutionSlimbox2 & HTML5
June 7, 201313 yr Author Oh, I've just realised, it's because when you're using a class, you're not defining the images as being part of a set (like you would normally doing rel="lightbox[coffee-and-cream]"). I'll see how this can be achieved using a class. Out of interest, why do you want to use a class instead of rel? Is it because you want to use it on something other than a link? Purely for validation Lyndsey, it's probably not all that important, but I'd like it to be valid Thanks for that link Wynn, will give it a look over now.
June 7, 201313 yr You could considder using Fancybox instead it uses clases to group images. But it doesn't matter that the the rel attribute doesn't validate I'm sure it wil work fine on any browser.
June 7, 201313 yr Author Thanks for the help guys, I've tried the fix from the link Wynn gave and it works!
Create an account or sign in to comment