WordPress.org

Ready to get started?Download WordPress

Forums

WP LinkedIn
[resolved] Changing Recommendation Scroll Speed (11 posts)

  1. sparkleflavor
    Member
    Posted 1 year ago #

    Greetings,

    Thanks for this awesome plugin! Sorry to bother you with this.. but I'm a JQuery newb... my quotes are a bit long, and I'd like to slow down the scroll speed.

    Assuming this is the right code to alter from recommendations.php file:

    <script>
    (function($) {
    	var h = 0;
    	$('#<?php echo $divid; ?> .items blockquote').each(function() {
    		h = Math.max(h, $(this).height());
    	});
    	$('#<?php echo $divid; ?>').height(h);
    	$('#<?php echo $divid; ?>').scrollable({circular:true}).autoscroll({autoplay:true,autopause:true});
    })(jQuery);
    </script>

    If not a simple fix... if you have any resources you direct me to -- I've done a bunch of searching... The closest I've come is a recommendation to use a window.setTimeout(nextSection, 1000, $(this));from this link:
    http://stackoverflow.com/questions/8168714/jquery-scrollable-ignores-delay

    But I'm not sure how to integrate it. Any advice would be greatly appreciated.

    Best,
    Amanda

    http://wordpress.org/extend/plugins/wp-linkedin/

  2. Claude Vedovini
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    The documentation for the scrollable is here: http://jquerytools.org/documentation/scrollable/index.html

    Basically you just need to add a speed speed argument like:

    $('#<?php echo $divid; ?>').scrollable({circular:true,speed:200}).autoscroll({autoplay:true,autopause:true});

  3. Claude Vedovini
    Member
    Plugin Author

    Posted 1 year ago #

    There's now a interval argument to the shortcode to set the time interval between the scroller moves.

  4. stephanieweitzenkamp
    Member
    Posted 8 months ago #

    Where do I add the above code? Please see my site, stephanieweitzenkamp.com. I cannot slow down the scroll and am not an expert coder.

    Thank you.

  5. Claude Vedovini
    Member
    Plugin Author

    Posted 8 months ago #

    Stephanie, the interval attribute in the shortcode is what you are looking for, something like:

    [li_recommendations interval="4000"]

    the interval value is in ms

  6. stephanieweitzenkamp
    Member
    Posted 8 months ago #

    Okay, thanks. Do I add this to the recommendations.php file? Sorry, I am trying to take a crash course on shortcodes. :-)

  7. Claude Vedovini
    Member
    Plugin Author

    Posted 8 months ago #

    For a crash course on shortcodes you can try this: http://wp.smashingmagazine.com/2012/05/01/wordpress-shortcodes-complete-guide/

    Shortcodes are to be put in posts and pages. Widgets in sidebars.
    From what I see on your link you put the recommendations widget in a sidebar which is fine, the scrolling speed is to be indicated (in milliseconds) when you setup the widget.

    Now you setup 700ms which way too fast, you're looking for seconds so something like 7000 will be better

  8. stephanieweitzenkamp
    Member
    Posted 8 months ago #

    Thanks so much. I have changed to 7000 and even 20000 and it still won't slow down. The Theme, vcard, is only giving me the option to add the widget to the sidebar, though it appears in the page. Thanks for the shortcode link. I will keep trying. :-)

  9. stephanieweitzenkamp
    Member
    Posted 8 months ago #

    I added the shortcode to my page and remmoved the widgets. I have the interval set at 12000 and still flying by. I guess this is learn in babysteps? I sure appreciate your patience Claude.

  10. stephanieweitzenkamp
    Member
    Posted 8 months ago #

    I followed the above and modified the .js file. It worked!!! Yeah! It is going slower, now I just want to increase the characters displayed.

    Thank you!

  11. Claude Vedovini
    Member
    Plugin Author

    Posted 8 months ago #

    I don't know what you are doing but it's definitely wrong.

    don't change the plugin's files, any modification you do will be overridden when you next update to a next version.

    shortcode usage is fairly simple, you just need to write down the shortcode in your post or page content. like so:

    [li_recommendations interval="4000"]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.