Welcome Guest, Not a member yet? Register   Sign In
lightbox doesn't work help
#1

[eluser]sasori[/eluser]
the structure of my app is like this
system/
myapp/
/application
/js/
jquery1.4.2.js
/js/
jquery.lightbox.0-5.js
/css/
jquery.lightbox-0.5.css

/images/

I downloaded the jquery-lightbox-0.5 plugin.and it doesn't work
here's my code
Code:
<link rel="stylesheet" type="text/css" href="http://ci/myapp/js/css/jquery-lightbox-0.5.css" />
[removed][removed]
[removed][removed]
[removed]
$(function(){
   $('div#main a').lightBox();
});
[removed]

    <div id="main">
<a class="lightbox" href="youtubelink"><img src="youtube thumbnail" width="72" height="72" /></a>
    </div>

can you tell me what's wrong ?
#2

[eluser]pickupman[/eluser]
What is your document root? Doesn't work is kind of vague. If you are using Firefox, get firebug plugin. It will show you if you have a js error. Is jQuery loading properly?
#3

[eluser]sasori[/eluser]
document root is
myapp/
i moved the system folder,so that I can create many apps with only one system folder..
i followed the instructions here
Code:
http://leandrovieira.com/projects/jquery/lightbox/
I used my firebug and check what's going on in the console, it says,
function undefined...but I followed the exact stuff from the source of the lightbox thing
Code:
$(function(){
$('a').lightBox();
});
#4

[eluser]pickupman[/eluser]
If it says function lightBox undefined, you don't have the correct source url for lightbox. You can double check by clicking on the JS tab, then clicking on the dropdown to select your lightbox source. If you get a 404 error, you know you have the wrong url. Same applies for your jQuery source.
#5

[eluser]danmontgomery[/eluser]
Quote:http://ci/myapp/js/css/jquery-lightbox-0.5.css

This won't work, assuming the paths in your script tags are structured the same way they won't work either.




Theme © iAndrew 2016 - Forum software by © MyBB