Tagged: tab
-
AuthorPosts
-
March 7, 2017 at 10:25 am #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:
March 8, 2017 at 12:30 pm #757733is there anybody here?
March 13, 2017 at 7:33 am #759839Hi 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,
RikardMarch 13, 2017 at 7:45 am #759843Dear 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
baharMarch 14, 2017 at 3:11 pm #760755Hi,
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 -
AuthorPosts
- You must be logged in to reply to this topic.