Viewing 5 replies - 1 through 5 (of 5 total)
  • Sure you can do that. You just need to add some jQuery for that.

    jQuery(document).ready(function($){
    
    	$triggered_times = 0;
    
    	$(window).on('scroll', function() {
        		var y_scroll_pos = window.pageYOffset;
        		var scroll_pos_test = 150;             // set to whatever you want it to be
    
        		if(y_scroll_pos > scroll_pos_test && $triggered_times == 0 ) {
            		$('#wpcs_handle').click();
    			$triggered_times = 1;
        		}
    	});
    
    })

    Just change the scroll_pos_test value as per your requirement and you are done.

    Where would I put this code?

    And what would I need to do to show the label once a user has scrolled down? To be clear: at first I want that show nothing. Only when the user has scrolled down I want to show the label.

    Hi beta Dog!

    There are many tutorials out there on how to add jQuery to WordPress. Here is one.
    how-do-i-add-a-simple-jquery-script-to-wordpress

    For that you would need to modify the above code a little bit.

    If you have any other question kindly start a separate topic as this one is resolved already.

    Thanks!

    Hi,

    I added your jQuery Script and it works fine, thanks a lot. Though I wondered if it is possible to set a cookie within it, so that if a user visits other pages on the website and comes back to the homepage (where I use the script) the jQuery does not “click” again?

    I tried to write one myself, but couldn’t figure it out, since I never wrote any jQuery or JavaScript myself before.

    Hi Mediamarx!

    Thanks for using our WordPress Contact Slider. Actually what you are asking is out of scope of this support forum. You can follow this link to know how to use cookie in your jquery;

    How to use cookie jQuery

    So if you have any other question regarding this plugin kindly start a new thread as this one is resolved.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Display/slide on scroll to a section’ is closed to new replies.