• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 541
  • Last Modified:

jQuery smooth scroll Problem

Hi,

I have an issue with a smooth scroll plugin I am using, it seems straight forward enough but for some reason the last image is not showing, it appears as though the right amount of white space is being left to display the image however.

This is what I have for this template page

<?php get_header(); ?>

<script src="<?php bloginfo("template_url"); ?>/js/jquery-ui-1.8.23.custom.min<?php echo $GLOBAL_GZSTRING;?>.js" type="text/javascript"></script>
<script src="<?php bloginfo("template_url"); ?>/js/jquery.mousewheel.min<?php echo $GLOBAL_GZSTRING;?>.js" type="text/javascript"></script>
<script src="<?php bloginfo("template_url"); ?>/js/jquery.kinetic<?php echo $GLOBAL_GZSTRING;?>.js" type="text/javascript"></script>
<script src="<?php bloginfo("template_url"); ?>/js/jquery.smoothdivscroll-1.3.min<?php echo $GLOBAL_GZSTRING;?>.js" type="text/javascript"></script>

<script type="text/javascript">
	$(document).ready(function () {
		$(".gallery-size-full dl").replaceWith(function() { return $(this).contents(); });
		$(".gallery-size-full dt").replaceWith(function() { return $(this).contents(); });
		$(".gallery-size-full p").remove();
		//$(".gallery-size-full dd").remove();
		
		$(".gallery-size-full").smoothDivScroll({
			hotSpotScrolling: true,
			touchScrolling: true,
			mousewheelScrolling: "allDirections"
		});
	});
</script>

<script type="text/javascript">$("#logo").html("Furniture");Cufon.now();</script>

<?php add_filter( 'use_default_gallery_style', '__return_false' ); ?>

<?php if(have_posts()): ?><?php while(have_posts()): the_post(); ?>
<?php the_content();?>
<?php endwhile; ?><?php endif; ?>

<?php get_footer(); ?>

Open in new window


Resulting page can be seen working here
http://cubbinandbregazzi.scorchsolutions.co.uk/furniture/chairs

Open in new window

http://cubbinandbregazzi.scorchsolutions.co.uk/furniture/chairs
0
ScorchD
Asked:
ScorchD
  • 2
1 Solution
 
Alexandre SimõesManager / Technology SpecialistCommented:
How are you setting the width?
because in fact if you add a single pixel plus on the scrollableArea div everything will work correctly
0
 
ScorchDAuthor Commented:
Hi Alex,

I realise that if I can add some pixels to one side it will probably resolve the fact that the image is falling below but that does not help me closer to a solution.

I dont seem to be able to affect the final width as calculated by the plugin nor can I seem to resolve by adding padding or margins to the images themselves.

Many thanks
0
 
Alexandre SimõesManager / Technology SpecialistCommented:
I think this might be a math problem with the plugin itself because to solve it you need to add 1 pixel only to the calculated width.

Have you tried with a different set of images to see if it works properly?

Another thing you can try is to fix the plugin itself.
If you go here: https://github.com/tkahn/Smooth-Div-Scroll/blob/master/js/jquery.smoothDivScroll-1.3.js
On line 1000 you have the function that does the calculation.

Try using this non-minified version of the plugin and, on line 1014 (currently empty) add the following:
tempScrollableAreaWidth = tempScrollableAreaWidth  + 1;

Open in new window

0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now