Convert plug page location after close?

I’m working on this page: https://abuyerschoice.com/join-dev/

I have a few popovers using the convert plugin. A video, an accordion and a contact form. They are manually activated when you click a button which calls their custom class.

My question is, when the user closes the popover box using the X in the upper right, how do can you set which area of the page they go back to? Currently it always take the user back to the top of the page on mobile.

Any suggestions?

UPDATE
I do have some custom css to help with the scrolling on mobile and I noticed the page background actually scrolls to the top while the popover is active.

.cp-modal {
overflow: scroll;
}

.cp-mp-open body, .cp-mp-open {
overflow: hidden;
}

Hi @nolannp11,

Thank you for reaching out to us. I believe this can be achieved with custom JavaScript, try adding the following code in the Theme Options > JS:

jQuery(document).ready(function($){
	$(".cp-image-close").click(function() {
		$('html, body').animate({
			scrollTop: $("#get-started").offset().top
		}, 1000);
	});
});

Where #get-started is the ID of your section where you want the page to scroll to after closing the popup.

Please note that the code provided above serves as a guide only and is to help you in getting started so implementing it and maintaining the code will be out of our support scope and for further maintenance for new possible versions of the theme that may cause the customization to break, you will need to hire a developer.

Hope this helps!

Thank you, this is great and works. I have 2 model’s on this page. Is there anyway to specify which one I want to target? I would like the page to scroll to a different area depending on which one the user clicked.

Where you have “.cp-image-close” is there a way to be more specific?

Hey @nolannp11,

It could be possible with custom development, but this would be outside the scope of support we can offer. You may wish to consult a developer to assist you with this. X is quite extensible with child themes, so there are plenty of possibilities.

Thanks for understanding. Take care!

Any chance I could pay you to do it? Can you recommend someone?

Hello @nolannp11,

Thanks for updating the thread. :slight_smile:

In your case my suggestion would be to post the requirement on Themeco Apex Peer to Peer forum. I also suggest you to post the requirement in Facebook group. I am sure you will get good and positive response.

Please note that the ThemecoUsers Facebook group is not backed by Themeco and is a community driven initiative.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.