Home › Forums › WoodMart support forum › scroll to with javascript is not working
scroll to with javascript is not working
- This topic has 12 replies, 3 voices, and was last updated 4 years, 11 months ago by Artem Temos.
-
AuthorPosts
-
December 23, 2019 at 7:41 pm #164746
captain53Participanthi, for some reasons i want to work with js…
so i tried but it could not worked
`var tab2312 = document.getElementByClassName(“woodmart-filter-buttons”);
var gogilter2312 = document.getElementById(“wcfmmp-store-product-search-5”);tab2312.onclick = function() {
window.scrollBy(0, 500);
}what should you advice to me
thanks.
December 24, 2019 at 8:50 am #164812
captain53ParticipantDo your Custom js tool is work?
December 24, 2019 at 9:21 am #164817
Aizaz Imtiaz AwanKeymasterHello,
What do you want to achieve exactly? The code which you shared where you used it in your site? If you are talking about scroll to top button, then i want to confirm you that it’s working on our test site.
Best Regards.
December 24, 2019 at 9:26 am #164820
captain53Participantit did not worked… i tried alert function to test your tool are work or not…
December 24, 2019 at 9:31 am #164822
captain53Participantvar tab2312 = document.getElementByClassName(“woodmart-filter-buttons”);
var gogilter2312 = document.getElementById(“wcfmmp-store-product-search-5”);tab2312.onclick = function() {
gogilter2312.scrollIntoView;
}i tried this code for wcfm store page to help user experience… my goal is when someone is click to the filters tab then he/she scroll to the filters section.
December 24, 2019 at 10:29 am #164827
Aizaz Imtiaz AwanKeymasterHello,
Kindly share screenshots, also the page URL on which filters tab shown and also share the screenshot of that section where you want to scroll the user after click.
Best Regards.
December 24, 2019 at 10:44 am #164830December 24, 2019 at 12:26 pm #164848
Aizaz Imtiaz AwanKeymasterHello,
Normally by clicking the “FILTERS” button the “Shop Filter” section shown which is inside the Appearance >> Widgets.
Screenshot for clarification: https://jmp.sh/0kMc0OA
The section which you pointing out in screenshot “Search in sellers”, if its a widget then simply drag that specific widget in “Shop Filter” widget area, then in result the section will show when someone clicks on Filters button.
Best Regards.
December 24, 2019 at 1:15 pm #164853
captain53ParticipantNo it is not the solution for me… i
want to inject js code in your theme… İ would like to manipulate execute js in pages…But whenever i try to effect the element it is not working…
December 24, 2019 at 1:47 pm #164856
Aizaz Imtiaz AwanKeymasterHello,
To inject that javascript code in our theme, requires customizations and this is beyond our limitations and support policy. We provide our dedicated support and this is out of our scope.
Best Regards.
December 24, 2019 at 3:07 pm #164860
captain53Participantso why did you add a custom jss section to your theme-panel? what is the role of custom js section?
December 24, 2019 at 3:08 pm #164861
captain53Participanti told you many time your custom js function is not working
December 24, 2019 at 3:10 pm #164862
Artem TemosKeymasterCould you please add the following code to the Custom JS section to check if it works?
alert('Custom JS is working correctly.');
-
AuthorPosts
- You must be logged in to create new topics. Login / Register