Find Answers and Get Support › Forums › Gwangi – PRO Multi-Purpose Membership, Social Network & BuddyPress Community Theme › Fine Tuning › Child Themes › Main.js folder and some custom css does not work in mobile
- This topic has 1 reply, 2 voices, and was last updated 3 years, 11 months ago by Themosaurusrex.
-
AuthorPosts
-
sercanParticipant@sercancs
- 3 Topics
- 8 Posts
Hello,
I am trying to add a multistep form to my website usind css, html and php. There are no issues with the code itself but i am having problems when adding the js code. I added it to the main.js folder in the child theme but the code works only on the computer not on the mobile phone. I am planning to add more custom js codes but there is this problem.
And some css codes also do not appear on the mobile version.
Can you help?
Thank youhere its my code
main.js folder'use strict'; /*global jQuery */ /*eslint yoda: [2, "always"] */ /** * main.js * * Theme enhancements for a better user experience. */ (function($){ $(function() { $(document).ready(function () { var navListItems = $('div.setup-panel div a'), allWells = $('.setup-content'), allNextBtn = $('.nextBtn'), allPrevBtn = $('.prevBtn'); allWells.hide(); navListItems.click(function (e) { e.preventDefault(); var $target = $($(this).attr('href')), $item = $(this); if (!$item.hasClass('disabled')) { navListItems.removeClass('btn-primary').addClass('btn-default'); $item.addClass('btn-primary'); allWells.hide(); $target.show(); $target.find('input:eq(0)').focus(); } }); allNextBtn.click(function(){ var curStep = $(this).closest(".setup-content"), curStepBtn = curStep.attr("id"), nextStepWizard = $('div.setup-panel div a[href="#' + curStepBtn + '"]').parent().next().children("a"), curInputs = curStep.find("input[type='text'],input[type='url']"), isValid = true; $(".form-control").removeClass("is-invalid"); for(var i=0; i<curInputs.length; i++){ if (!curInputs[i].validity.valid){ isValid = false; $(curInputs[i]).closest(".form-control").addClass("is-invalid"); } } if (isValid) nextStepWizard.removeAttr('disabled').trigger('click'); }); allPrevBtn.click(function(){ var curStep = $(this).closest(".setup-content"), curStepBtn = curStep.attr("id"), prevStepWizard = $('div.setup-panel div a[href="#' + curStepBtn + '"]').parent().prev().children("a"); $(".form-control").removeClass("is-invalid"); prevStepWizard.removeAttr('disabled').trigger('click'); }); $('div.setup-panel div a.btn-primary').trigger('click'); }); /** * jQuery code goes here... */ }); })(jQuery);
May 31, 2020 at 12:37 #13381@themosaurusrex- 0 Topics
- 2048 Posts
Hi @sercancs,
I’m sorry to inform you that changing and debugging this is considered customization work. Unfortunately, this is a service that we do not provide.
We only share snippet only to solve issues with our theme. Any further request for CSS snippets will have to be part of a defect that needs to be fixed urgently. No snippets will be shared otherwise.
If you want to go further with the customization of your website, we advise that you hire a freelancer to do it for you.
If you’re on a tight budget, we recommend you to require the services from Envato Studio freelancers (https://studio.envato.com/explore/websites-programming). This web platform gives you access to developers who have already experience with theme customizations, and for very competitive prices.
Best,
June 2, 2020 at 16:08 #13463 -
AuthorPosts
Hi there,
This topic has been inactive for a while now so we will be closing it to keep the forum tidy. Don't hesitate to create a new topic if you still need help and we'll be glad to help you!
Best regards,
The Themosaurus team.
The topic ‘Main.js folder and some custom css does not work in mobile’ is closed to new replies.