Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

jQuery Image Slider

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-17-2010, 02:24 AM
 
sdfjlsdfsdf sdfjlsdfsdf is offline
 

Member
  
Join Date: May 2010
Location: Upholland
Posts: 12
 

Default jQuery Image Slider

I have implemented the Nivo Slider - http://nivo.dev7studios.com/

Onto our site - http://www.chemist-4-u.com

And for the life of me I cannot understand why all the images are opening on load.

I have placed the div information into - "welcome.tpl" from skin1/customer/main and then the stylesheet and JavaScript links into - "home.tpl" from skin1/customer

It seems like the entire page loads before it processes the JavaScript properly.

I'm sure it's going to be something really simple but any ideas of where to go from here would be fantastic.
__________________
xcart 4.3.1
Reply With Quote
  #2  
Old 08-17-2010, 05:46 AM
 
Shamun Shamun is offline
 

X-Adept
  
Join Date: Jun 2009
Location: North Carolina
Posts: 841
 

Default Re: jQuery Image Slider

jQuery usually doesn't mess with the page until its ready to be manipulated. Infact that's one of the selling points of it.

If you want, you can add a height and overflow: hidden to #slider
That would make it so the images except for the first one is hidden until the page loads or the user enables javascript.
__________________
- Shane Munroe
Reply With Quote
  #3  
Old 08-17-2010, 06:10 AM
 
sdfjlsdfsdf sdfjlsdfsdf is offline
 

Member
  
Join Date: May 2010
Location: Upholland
Posts: 12
 

Default Re: jQuery Image Slider

Hi Tal thanks for the advice, I tried putting a height and overflow:hidden into my sliders CSS but I'm still getting the same results.

I tried it in .slider, .slider img, and slider a.nivo-imageLink but it still is having none of it. Really pulling my hair out on this one!
__________________
xcart 4.3.1
Reply With Quote
  #4  
Old 08-17-2010, 06:56 AM
 
sdfjlsdfsdf sdfjlsdfsdf is offline
 

Member
  
Join Date: May 2010
Location: Upholland
Posts: 12
 

Default Re: jQuery Image Slider

Hi again,

Solved it! I was being silly and putting the height and overflow information into class sections.

Thanks heaps Tal will keep you in mind for small jobs!
__________________
xcart 4.3.1
Reply With Quote
  #5  
Old 08-17-2010, 07:13 AM
 
sdfjlsdfsdf sdfjlsdfsdf is offline
 

Member
  
Join Date: May 2010
Location: Upholland
Posts: 12
 

Default Re: jQuery Image Slider

Ok I spoke to soon

All is well in Chrome + Firefox, but for some reason Internet Explorer is overlapping the images onto one another... Any ideas?
__________________
xcart 4.3.1
Reply With Quote
  #6  
Old 12-13-2010, 07:57 AM
 
bjt bjt is offline
 

Advanced Member
  
Join Date: Jul 2008
Location: Vietnam
Posts: 32
 

Default Re: jQuery Image Slider

I've tried the suggestions on the forum for the Nivo slider but can't get it to work. In IE it shows a javascript error and in FF it just shows all my images at once.
The test site is http://bennettdirect.staging.dynamix.com.au/home.php if anyone can suggest a solution.
__________________
X-Cart Gold 4.3.2 (Windows)
X-Cart Gold Plus 4.6.1 (Linux)
Magic Toolbox slider and zoom
Reply With Quote
  #7  
Old 12-13-2010, 05:21 PM
 
Shamun Shamun is offline
 

X-Adept
  
Join Date: Jun 2009
Location: North Carolina
Posts: 841
 

Default Re: jQuery Image Slider

Quote:
Originally Posted by bjt
I've tried the suggestions on the forum for the Nivo slider but can't get it to work. In IE it shows a javascript error and in FF it just shows all my images at once.
The test site is http://bennettdirect.staging.dynamix.com.au/home.php if anyone can suggest a solution.
Code:
$("#slider").nivoSlider is not a function

That's the error given.
You should try removing X-carts default version of jQuery since you've included your own which is more recent. That could very well be your problem.
__________________
- Shane Munroe
Reply With Quote
  #8  
Old 02-01-2011, 01:02 PM
 
jlrentertainment jlrentertainment is offline
 

Newbie
  
Join Date: Mar 2010
Posts: 6
 

Default Re: jQuery Image Slider

I am having the same problem, I added the jquery 1.4.2 in my meta.tpl as below, but I'm still getting this error.
HTML Code:
{if $config.UA.browser eq 'Safari'} <script type="text/javascript" src="{$SkinDir}/jquery-safari.js"></script> {else} <script type="text/javascript" src="{$SkinDir}/jquery-min-142.js"></script> {/if} <script type="text/javascript" src="{$SkinDir}/jquery-fix.js"></script> <script type="text/javascript" src="{$SkinDir}/ajax.js"></script>

I also changed these back and forth:

I also changed
HTML Code:
{literal} <script type="text/javascript"> $(window).load(function() { $('#slider').nivoSlider(); }); </script>{/literal}
to:
HTML Code:
{literal} <script type="text/javascript"> $(window).load(function() { jQuery('#slider').nivoSlider(); }); </script>{/literal}

I'm so lost with this one. I never imagined that adding a little bit of javascript to X-Cart would be such a headache. If anybody can help me, I would greatly appreciate it.
__________________
X-Cart v4.3.1
Reply With Quote
  #9  
Old 02-04-2011, 08:22 AM
 
mekon mekon is offline
 

Senior Member
  
Join Date: Jan 2011
Posts: 180
 

Default Re: jQuery Image Slider

I had a problem were xcart seemed to be striping:

$('#slider').nivoSlider();

So I put the whole lot:

$(window).load(function() {
$('#slider').nivoSlider();
});

into a new js file and loaded in after:

<script type="text/javascript" src="/skin/common_files/slider/load.js"></script>
__________________
------------------------------------------------

Darren
Reply With Quote
  #10  
Old 02-04-2011, 11:40 PM
 
Will Hayes Will Hayes is offline
 

eXpert
  
Join Date: Apr 2007
Location: Waterford, Ireland
Posts: 206
 

Default Re: jQuery Image Slider

Hi guys,

If you would like to use a commercial alternative (that just works - no fuss),
then take a look at our xBanners banner manage module specifically developed for x-cart.

Download your 15 day free trial first and see how xBanners can transform your site.

http://www.thexcartstore.com/xbanners-banner-module-for-xcart.html

regards
W.
__________________
The xCart Store.com - Professional x-cart modules and x-cart templates
xMenus, Predictive Search, xBanners2, Busy Kitchen, xtreme Gear, Modern Living, xMobile - Smartphone template & Responsive x-cart template

x-cart 3.x.x
x-cart 4.x.x
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 09:48 AM.

   

 
X-Cart forums © 2001-2020