Button link to side panel contact form

6 replies · opened Jun 25, 2018

FFLAVEXJun 25, 2018

Hi

I want to use several links within the page niche CAR to the side panel contact form, pointing to section id="contact-me" or id="side-panel", through href="#contact-me" but it's not working.

Can you help ASAP?

Thanks.

SSemicolon WebSTAFFJun 27, 2018

Hello,

This functionality is not available by default and will need some Custom JS Codes. Please consider adding the following JS Code at the bottom of the Page just after the js/functions.js JS File Linking:


	jQuery(document).ready( function(){
		setTimeout(function() {
			if (location.hash) {
				window.scrollTo(0, 0);
			}
		}, 1);
	});

	jQuery(window).on('load', function(){
		var divScrollToAnchor = window.location.hash;

		if( typeof divScrollToAnchor !== 'undefined' ) {
			if( divScrollToAnchor == '#side-panel' || ( jQuery( divScrollToAnchor ).parents('#side-panel').length > 0 ) ){
				var t = setTimeout( function(){
					jQuery('body').toggleClass("side-panel-open", true);
				}, 500);
			}
		}
	});

This should definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

FFLAVEXJul 5, 2018

Hi Team

Thanks for the reply.

At the moment it's not working. If I click on the button with the code href="#side-panel" ; there is not action executed. But if I reload the page, then, the side panel is opened. So the action is taken only if I reload the page. I've tested the change in several browsers. Also, when I click on the button, the id #side-panel is added to the url, but when I use the icon/button of the side panel the url not change.

Do you know why?

I've attached the html used.

Thanks again.

Flavio.

FFLAVEXJul 5, 2018

Hi

How can I send the html file?

Thanks.

SSemicolon WebSTAFFJul 6, 2018

Hello,

To open the Side Panel on the Click of the Link, simply add the .side-panel-trigger Class to it.

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

FFLAVEXJul 7, 2018

Hi Team

Good, it worked with a little bit of work in all the buttons types.

Thanks for your time and help!

Regards.

SSemicolon WebSTAFFJul 9, 2018

Hello,

Really Glad that your issues were resolved. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard