Not Loading Images

3 views
Skip to first unread message

NeoPuma

unread,
Jul 20, 2008, 6:01:33 PM7/20/08
to facebox
Hey
My FaceBox is working fine, but fails to load the images around the
box itself.
I have my face box script layed out as follows:

Code:
/scripts/facebox.js

CSS:
/styles/facebox.css

Images:
/images/facebox/

I have changed the CSS locations AND the JS (the following):
Javascript:
Line 82: loadingImage : 'images/facebox/loading.gif',
Line 83: closeImage : 'images/facebox/closelabel.gif',
Line 100: <img src="images/facebox/closelabel.gif" title="close"
class="close_image" />

CSS:
Lines 1-19
#facebox .b {
background:url(images/facebox/b.png);
}

#facebox .tl {
background:url(images/facebox/tl.png);
}

#facebox .tr {
background:url(images/facebox/tr.png);
}

#facebox .bl {
background:url(images/facebox/bl.png);
}

#facebox .br {
background:url(images/facebox/br.png);
}

Thanks for any help in advance.

Jonny Stephens

unread,
Jul 20, 2008, 6:51:31 PM7/20/08
to facebox
Your CSS file is expecting the images to be in the following location
(assuming the initial / you've indicated in the path to facebox.css is
your public root):

/styles/images/facebox/

Either move the images there or make the path absolute e.g.

#facebox .br {
background:url(/images/facebox/b.png);

NeoPuma

unread,
Jul 20, 2008, 7:01:53 PM7/20/08
to facebox
Ah! So Simple! I couldn't see it! Cheers m8, You're a star. Now any
ideas why:

<a href="login.php" rel="facebox">Login</a>

Would be sending me to a login.php rather than loading it in the
facebox itself?

Jonny Stephens

unread,
Jul 20, 2008, 7:51:00 PM7/20/08
to facebox
If the paths to jQuery and facebox.js are OK then it may be how you're
calling it.

<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox()
})
</script>

in the head should work.

If any other javascripts are included in the main page or login.php
try disabling them to test for conflicts.

If the page is online, provide an URL and I'll take a look.

NeoPuma

unread,
Jul 20, 2008, 8:39:07 PM7/20/08
to facebox
Brilliant. Thank-you. All working :)
Reply all
Reply to author
Forward
0 new messages