Problem to integrate Camera slider

561 views
Skip to first unread message

Myrtéa Formations

unread,
Oct 3, 2016, 6:06:51 AM10/3/16
to Camera slideshow
Hello everybody,

I have a problem to integrate Camera Slider.
Usually I have no problems to integrate something founded on the web but in this case ... I can't fix it. So I hope you could help me.

Here is my website structure (I'm working in localhost):
- My index page (with Doctype, header, footer etc.) is te lead page and call some pages wen it's necessary.
- This page call another page, based 2 folders below to include homepage elements. (And I want Camera slider in homepage).
- Camera-master folder is in website root.

So I put in the index, between <head> and </head> :

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
       
<script type='text/javascript' src='Camera-master/scripts/jquery.min.js'></script>
<script type='text/javascript' src='Camera-master/scripts/jquery.mobile.customized.min.js'></script>
<script type='text/javascript' src='Camera-master/scripts/jquery.easing.1.3.js'></script>
<script type='text/javascript' src='Camera-master/scripts/camera.min.js'></script>
<script>
    jQuery
(function(){
           
           
              jQuery
('#camera_wrap_1').camera(); //the basic method        
   
});
</script>

And in my homepage file :


<link rel='stylesheet' id='camera-css'  href='./Camera-master/css/camera.css' type='text/css' media='all'>
   
<style>        
       
#back_to_camera {
            clear
: both;
            display
: block;
            height
: 80px;
            line
-height: 40px;
            padding
: 20px;
       
}
       
.fluid_container {
            margin
: 0 auto;
            max
-width: 1000px;
            width
: 90%;
       
}
   
</style>
       
   
<div style="clear:both; display:block; height:100px"></div>
   
<div class="camera_wrap_1">
           
<div data-thumb="./Camera-master/images/slides/thumbs/bridge.jpg" data-src="./Camera-master/images/slides/thumbs/bridge.jpg"></div>
           
<div data-thumb="./Camera-master/images/slides/thumbs/leaf.jpg" data-src="./Camera-master/images/slides/thumbs/leaf.jpg"></div>
           
<div data-thumb="./Camera-master/images/slides/thumbs/road.jpg" data-src="./Camera-master/images/slides/thumbs/road.jpg"></div>
       
</div>

<div style="clear:both; display:block; height:100px"></div>

I also tried to put everything in the homepage file without any success ...

When I look at the browser console, I have "TypeError: jQuery(...).camera is not a function". But my js files inclusion seems to be good, because I have tried with

jQuery.getScript() ...


If you have an idea before I lost my hair.
Thanks in advance for answers. And sorry for my english, I'm French ...


Myrtéa Formations

unread,
Oct 3, 2016, 8:16:45 AM10/3/16
to Camera slideshow
I just forgot to say that nothing is on the screen ... Absolutely nothing :/

Geoff

unread,
Oct 3, 2016, 7:14:56 PM10/3/16
to Camera slideshow

  How are you including or calling one file from the other.  I suspect what is happening is that the index is loading complete before the homepage is loaded.  Since homepage has #camera_wrap_1 defined, index doesn't see it so it would give the error you see.

Myrtéa Formations

unread,
Oct 4, 2016, 3:38:43 AM10/4/16
to Camera slideshow
Hi Geoff, thanks for your answer.
I'm including the homepage easily, when I need it (so in <body>, in my main content) with :

case 'homepage':
            include
("way/to/homepage.php");

And my homepage.php is the text for the homepage, slider and other things.
It worked with another slider.
Maybe there is a conflict between Camera slider and other js scripts ? How could I know if it's the case ?
Thanks in advance for answers.

Geoff

unread,
Oct 4, 2016, 7:07:39 PM10/4/16
to Camera slideshow

  without seeing the entire rendered code, it's impossible to provide much more help.  I would guess that homepage.php is not being included when it is supposed to be. if you can save the rendered code somewhere and upload a link to it, I can take a look. (I assume the site is not live, since you mentioned localhost)

Eivar Armero

unread,
Apr 5, 2017, 9:22:23 AM4/5/17
to Camera slideshow
Hey I have faced the same problem using wordpress, found that root error is that camera scripts are loaded before the jquery one, so just change the order in how them are loaded.
I hope it helps someone.
Message has been deleted

Nipo Sofela

unread,
Nov 27, 2018, 6:43:09 PM11/27/18
to Camera slideshow


On Wednesday, November 28, 2018 at 12:40:21 AM UTC+1, Nipo Sofela wrote:
Hello Eivar Armero, I ran into this issue. I have been trying to solve it for DAYS! Then a google search brought me to this page and your comment. I changed the order and it worked! I joined this group just to say Thank you very very very much. You have no idea how much you have helped me. I had gotten so frustrated, because I knew the code was correct yet I could not fathom why it wasn't working. Thanks once again.
Reply all
Reply to author
Forward
0 new messages