Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #877930
    jorrit91
    Participant

    Hi there,

    I have a very weird problem. I’ve pretty much finished a website for a local real estate agent using X. It works great, but one thing is driving me crazy for quit a while now (and I mean, REALLY, I’ve been trying to get my head around this for four weeks!). This is my configuration:
    X Theme
    WordPress 4.2.2
    WP Listings plugin (heavily modified)

    And this is the problem:
    When I’m viewing a single-listings page (like this one) on a touch device, I can’t open the different tabs (like “omschrijving”, “details” and “foto’s”). You can recreate the problem on desktop in Chrome by tapping f12 and then ctrl+shift+M, so you’re in touch device mode.

    I’ve looked for help on Stack Overflow and the WordPress-forum (this thread) but nobody has been able to identify the problem. I’m thinking it has to be some kind of conflict with JS files, and the latest suggestion I got from the WP forum was to reach out to you guys. You pretty much my only hope, can you please help me?

    #878431
    Jack
    Keymaster

    Hi there,

    hanks for writing in, this is a confirmed bug and should be patched in the next release.

    If you want to patch it yourself for now, you can go to x/framework/js/dist/site/x-body.js

    And on line 1946, change that code to:

    
      //
      // Scroll trigger.
      //
    
      $('a[href*="#"]').on('touchstart click', function(e) {
        href        = $(this).attr('href');
        notComments = href.indexOf('#comments') === -1;
        if ( href !== '#' && notComments ) {
        notAccordion = href.indexOf('#collaspe-') === -1;
        notTabbedContent = href.indexOf('#tab-') === -1;
        if ( href !== '#' && notComments && notAccordion && notTabbedContent ) {
          var theId = href.split('#').pop();
          var $el   = $('#' + theId);
          if ( $el.length > 0 ) {
            e.preventDefault();
            animateOffset($el, 850, 'easeInOutExpo');
          }
        }
    

    Please note, you’ll then need to re-compile x-body.js, to it’s minified form, and update that file as well.

    Any change you make to these files will be overwritten on update.

    Thank you!

    #878458
    Thai
    Moderator

    Hi There,

    Thanks for writing in!

    Please try adding following JS code under Custom > JavaScript in the Customizer:

    jQuery(document).ready(function($) {
    	$('.ui-tabs-nav>li>a').off('touchstart');
    	$('.ui-tabs-nav>li>a').on('click', function() {
    		$('html, body').animation().stop();
    	});
    });

    Thank you!

    #881627
    jorrit91
    Participant

    Oh my god…!

    That’s it! Thank you so much!!

    #881927
    Zeshan
    Member

    You’re most welcome! 🙂

  • <script> jQuery(function($){ $("#no-reply-877930 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>