Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function rtl_columns_fix(){
- ?>
- <script>
- (function($){
- var resizeTimeout, sortedReverse = false;
- $(window).resize(function () {
- if (resizeTimeout) {
- window.clearTimeout(resizeTimeout);
- }
- resizeTimeout = window.setTimeout(function () {
- var windowWidth = window.innerWidth;
- if ((windowWidth < 767 && !sortedReverse) || (windowWidth >= 767 && sortedReverse)) {
- var rtlContainer = $('.entry-content-wrapper, #footer .container');
- rtlContainer.each(function(){
- var rtlCols = $(this).children('.flex_column').not('.av_one_full');
- $(this).append(rtlCols.get().reverse());
- });
- sortedReverse = !sortedReverse;
- }
- }, 100);
- }).trigger("resize");
- })(jQuery);
- </script>
- <?php
- }
- if(is_rtl()) {
- add_action('wp_footer', 'rtl_columns_fix');
- }
Advertisement
Add Comment
Please, Sign In to add comment