How to enable visibility of the name of the selected attribute on the mobile version

This topic has 4 replies, 3 voices, and was last updated 1 years, 9 months ago ago by Andrew Mitchell

  • Avatar: Anastasiia
    Anastasiia
    Participant
    February 19, 2024 at 10:21

    Hello. how to enable visibility of the name of the selected attribute on the mobile version?
    In the web version, everything is visible
    https://imgur.com/iYg6ngS
    but in the mobile version, when you select an attribute, the name does not appear.
    https://imgur.com/T22QD9h
    buyers think that they cannot choose an attribute.
    please, help

    3 Answers
    Avatar: Justin
    Luca Rossi
    Support staff
    February 19, 2024 at 19:32

    Dear Anastasiia,

    We hope this message finds you well.

    To enhance the user experience on the mobile version of our website by displaying the name of the selected attribute, we kindly request that you insert the following script into the functions.php file located within your child theme directory:

    
    add_action('wp_footer', 'n2t_wp_footer', 99);
    function n2t_wp_footer() {
    	?>
    	<script>
    		!function($) {
    			"use strict";
    			$(document).on('click', 'ul.st-swatch-preview span.st-custom-attribute', function (){
    				if($(window).width() < 769){
    					var li = $(this).parent("li");
    					li.parents("tr").find(" > th label").attr("data-swatch-name", $(this).data("name"));
    				}
    			});
    		}(jQuery);
    	</script>
    	<?php
    }
    

    Your assistance with this matter is greatly appreciated. Should you have any questions or require further clarification, please do not hesitate to reach out.

    Warm regards,
    The 8Theme Team

    Avatar: Anastasiia
    Anastasiia
    Participant
    February 24, 2024 at 09:17

    Thank you!

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    February 24, 2024 at 09:18

    Dear Anastasiia,

    Choosing our theme reflects your commitment to quality, and for that, we’re genuinely grateful. As we constantly strive to elevate your experience, your feedback is an invaluable gift. Could you kindly take a moment to rate our product with 5 stars on ThemeForest?

    Click here to share your insights: https://themeforest.net/downloads

    Your support fuels our journey, and we appreciate it more than words can express.

    Best Regards,
    The 8Theme Team

  • Viewing 4 results - 1 through 4 (of 4 total)

The issue related to '‘how to enable visibility of the name of the selected attribute on the mobile version’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.