bojancg
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: WordPress core jQuery messes UI tabsYou were saying the tabs worked but there was some misbehaviour on mobile?
Yes, that is true. Out of the box they would scroll to the content of the tab when selecting a tab. Then I added the JS block you are referring to. It stopped scrolling, but only on desktop browsers. Scrolling continued on mobile, plus being unable to select enabled tab.
P.S.
Sorry, forgot to mention, I did define$ = jQuery;
at top of my script.
Forum: Fixing WordPress
In reply to: WordPress core jQuery messes UI tabsThanks for your reply Andrew ??
Here is all UI-tabs related code. If I find time, I’ll recreate this anomalies with some generic page, but with same WP version and theme. I’m posting here a version that works on mobile devices. That is, version with jQuery from Google’s CDN.
Order in which scripts are loaded (I’ve filtered this due to many other scripts and styles):
<head> <!-- ... many styles ... --> <link rel="stylesheet" id="jquery-ui-style-css" href="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.css?ver=4.2.4" type="text/css" media="all"> <link rel="stylesheet" id="jquery-ui-style-structure-css" href="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.structure.min.css?ver=4.2.4" type="text/css" media="all"> <link rel="stylesheet" id="jquery-ui-style-theme-css" href="https://localhost/kreditni-kalkulator.hr/wp-content/themes/x-child/kreditni_kalkulator/new_jQuery-ui/jquery-ui.theme.min.css?ver=4.2.4" type="text/css" media="all"> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js?ver=4.2.4"></script> <script type="text/javascript" src="https://localhost/kreditni-kalkulator.hr/wp-content/themes/x-child/kreditni_kalkulator/js/jquery-migrate.min.js?ver=4.2.4"></script> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js?ver=4.2.4"> <!-- ...some more stuff from WP, plugins and X-Theme... --> </head>
Initialization of tabs and rest of code relevant to tabs…
I think logic of enabling/disabling specific tab by it self shouldn’t make any difference. But than again, I don’t consider myself an expert.
Process of de-registering and new registering of jQuery library is as in first post.Should I put some more info?
Forum: Fixing WordPress
In reply to: WordPress core jQuery messes UI tabsUnfortunately, I can’t link the page yet as my superior doesn’t allow me to do that. Would it help if I put here all code relevant to tabs and order in which scripts are loaded in the <head>?
I am aware that problem could be somewhere else, but why would it work OK with original jQuery library and doesn’t work with WP’s one.
I’ll try to post this problem on X-Theme’s support and see what they have to say.