Jquery problem

Permalink
Hi,
I couldn't get the C5 editing bar to appear on my site. I have a jquery slideshow on a page and the editing bar reappeared when I deleted the link to jquery. How do I keep jquery without losing the editing bar? I'm not a php programmer and I'm at a loss.
Three of the jquery files I was linking to are local and the fourth is on google's server.
Any help is greatly appreciated.

jchick
 
MattWaters replied on at Permalink Reply
MattWaters
concrete5 loads its own copy of jQuery, so keep that in mind when adding any other jQuery-based items to your page. If you load the library twice, you'll run into problems like the one you mentioned.

I'd recommend taking a look at your slideshow's source and seeing if you can omit any redundant calls to load jQuery.

This approach might not solve every jQuery / js problem but this is a common issue when integrating components that have not been fully adapted to play well with concrete5.

Hope this helps get you on the right track.
jedininja replied on at Permalink Reply
jedininja
I'm having a similar problem but still trying to figure out exactly what's going wrong. The only way I've found to fix my site map issue (currently not accessible and returns Page Not Found Errors) is to update C5 versions. But after updating, I sign in and the toolbar is gone until I navigate to a different page other than the home page. Plus, on the home page my slider is broken and displays all images all over the page vertically. I tried removing my jquery but no improvement. Using Firebug and looking at the Console, I see 1 error:

title is undefined
[Break On This Error]

...Image.attr('title')!=''){var title=vars.currentImage.attr('title');if(title.subs...

But I have no idea what that means.

Is there a way I can remove C5's jquery call and just use the one my site has always been using, at least just to see if the problem is jquery alone. Any help is much appreciated.
Here is the client site I'm having the problem with:http://www.gardenerssupplyinc.com/...
jedininja replied on at Permalink Reply
jedininja
Not sure why but after removing this block of code, I got the tool bar back.

<div id="slideshow_before">
            <img src="<?=$this->getThemePath()?>/images/grass_before.png" alt="Grass: Before" />
            <img src="<?=$this->getThemePath()?>/images/fountain_before.png" alt="Fountain: Before" />
            <img src="<?=$this->getThemePath()?>/images/tree_before.png" alt="Tree: Before" />
         </div>
         <div id="slideshow_after">
            <img src="<?=$this->getThemePath()?>/images/grass_after.png" alt="Grass: After" />
            <img src="<?=$this->getThemePath()?>/images/fountain_after.png" alt="Fountain: After" />
            <img src="<?=$this->getThemePath()?>/images/tree_after.png" alt="Tree: After" />
         </div>


I guess I'll just have to recreate the slideshow? But idk what would concrete5 agree with?
I tried removing script includes on that page, but curiously that didn't work, just the image divs. But I don't understand why?


***Update.
So, wow. I kept thinking about everything, this still doesn't make any sense why it would break the tool bar, but thanks to firebug console, I added tittle="" to all images in slider. Now have the toolbar back!! But I think now I just need to work on the padding/margins of the elements on the page and everything will be great.. and I'll have a functional site map!
jedininja replied on at Permalink Reply
jedininja
Ok, new update. I discovered that indeed I fixed the tool bar issue, and the slideshow shows normal when logged it. But viewing it as a visitor while not logged in the slideshow is still broken, and the code shows that the title tags have not been applied. Why? And where do I find that file to change it??
jedininja replied on at Permalink Reply
jedininja
I guess I keep answering my problems. After clearing the cache, the slideshow now works and the generated code shows the title attributes. Hopefully now the worst of this website is over. At least now I know in order to actually fix the padding and margins, I'll also need to clear the cache.
JohntheFish replied on at Permalink Reply
JohntheFish
If you are just putting a bit of script in an html block, then my Load jQuery.UI addon may be of use.http://www.concrete5.org/marketplace/addons/load-jquery-ui/...

You can either use it directly, or hack it so it only does the jquery and not the ui, or hack it to add other scripts you need loaded.

If you are developing a block, you can cut/paste the code so your block loads jquery in the best way for C5.