Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #756868

    Hi
    tab section is very good but it not working in rtl sites.

    in rtl sites div class “inner container” has element style that is generated by jquery.
    for example:

    element.style {
    width: 900vw;
    transform: translate3d(-11.1111%, 0px, 0px);
    left: 0%;
    }

    transform value is variable by tab selection between -11.1111 and -88.8889 .
    this values in RTL sites must be +11.1111 and +88.88889 …..

    is there any way to solve this problem? variables are generated dynamically and i can not change this by css codes….

    sample images are as below:

    https://ibb.co/d3b3ka
    https://ibb.co/iZc9Qa

    #757733

    is there anybody here?

    #759839

    Hi Bahar,

    Sorry for the late reply. Could you post a link to the site in question so that we can take a closer look please?

    Best regards,
    Rikard

    #759843

    Dear Rikard,
    you’re welcome.
    i have not live site . i am test news version in localhost.
    do you see pictures? i attached images by inspected.
    for temporary solve the problem i can set “plugin” id in developer section of tab element. and set “direction:ltr” for style of #plugin. but this solution is temporarily and i need to set plugin id to any tab element in my site.

    other solution is change js codes.
    i changed this code:
    var new_pos = ((parseInt(tab_nr,10) – 1) * -100 );
    to
    var new_pos = ((parseInt(tab_nr,10) – 1) * +100 );

    but by this solution my site is corrected only in RTL languages and tab section not shown correct in LTR languages.

    thank you
    bahar

    #760755

    Hi,

    Can you please changing following line in enfold/js/shortcodes.js file

    
    var new_pos = ((parseInt(tab_nr,10) – 1) * -100 );

    to following one

    
    				if ($('body').hasClass("rtl")) {
    					var new_pos = ((parseInt(tab_nr,10) - 1) * +100 );
    				}
    				else {
    					var new_pos = ((parseInt(tab_nr,10) - 1) * -100 );
    				}

    You can firstly move the file to your child theme – http://kriesi.at/documentation/enfold/using-a-child-theme/, apply the changes there and then add following code to functions.php file of your child theme

    function wp_change_shortcodesjs() {
       wp_dequeue_script( 'avia-shortcodes' );
       wp_enqueue_script( 'avia-shortcodes-child', get_stylesheet_directory_uri().'/js/shortcodes.js', array('jquery'), 2, true );
    }
    add_action( 'wp_print_scripts', 'wp_change_shortcodesjs', 100 );

    Best regards,
    Yigit

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.