Tagged: x
-
AuthorPosts
-
January 17, 2017 at 11:47 am #1333814
roman5987ParticipantHi, on the user page of my website I have a 2/3 section that contains 6 tabs. Each tab is a separate category and on click I want to display the corresponding grid. I am using The Grid and it works well, however only after resizing the page. The slightest resize is what activates it to be displayed, without it the content of the tab is blank. On mobile the problem is similar but the grid appears once the user scrolls on the page. Not really sure whats causing this behavior and would appreciate some assistance.
The other question I have is how to style the tab backgrounds on click. I have a unique ID for each tab. Can I do this in CSS or would I have to stick to onclick in JavaScript?
Thank You for your time.
January 17, 2017 at 11:50 am #1333820
roman5987ParticipantThis reply has been marked as private.January 17, 2017 at 3:51 pm #1334142
Nabeel AModeratorHi there,
Thanks for writing in! Try adding the following jQuery script in your Customizer via Appearance > Customize > Custom > Edit Global Javascript
jQuery(document).ready(function($) { $('.x-nav-tabs-item a').click(function(){ $(window).resize(); }); });Don’t forget to clear your browser’s cache after adding the code. Let us know how this goes!
January 18, 2017 at 1:18 pm #1335475
roman5987ParticipantHi, after adding this code, the grid would appear only on the second click of the given tab and it also introduced an issue with the horizontal scrolling of the grid (it became locked in place).
January 18, 2017 at 7:48 pm #1336067
RadModeratorHi there,
Please try this,
jQuery(document).ready(function($) { $('.x-nav-tabs-item a').click(function(){ setTimeout( function() { $(window).resize(); }, 1500 ); }); });The click triggers even before the grid appears, hence, the rendering isn’t triggered. With added 1.5 seconds delay, then it should work. You can change 1500 if you think 1.5 seconds is long 🙂
Thanks!
January 18, 2017 at 8:09 pm #1336085
roman5987ParticipantThat worked! Thank you!
While I’m still here i just want to quickly address the follow up question I had. I need to style the tab backgrounds on click. I have a unique ID for each tab. Can I do this in CSS or would I have to stick to onclick in JavaScript?
January 19, 2017 at 1:08 am #1336290
Rue NelModeratorHello There,
Thanks for updating in! To style the tab backgrounds of the active tab, please add the following css code in the customizer, Appearance > Customize > Custom > CSS
#socialTab.x-nav-tabs-item.active a { background-color: red !important; } #conventionalTab.x-nav-tabs-item.active a { background-color: red !important; } #realisticTab.x-nav-tabs-item.active a { background-color: red !important; } #investigativeTab.x-nav-tabs-item.active a { background-color: red !important; } #artisticTab.x-nav-tabs-item.active a { background-color: red !important; } #enterprisingTab.x-nav-tabs-item.active a { background-color: red !important; }We would loved to know if this has work for you. Thank you.
January 19, 2017 at 11:27 am #1336917
roman5987ParticipantHey, yes that worked great. Exactly what i needed. Thank you for your help!
January 19, 2017 at 11:33 am #1336928
Prasant RaiModeratorYou are most welcome. 🙂
January 24, 2017 at 9:47 pm #1344180
roman5987ParticipantHi guys, sorry to bother you again but I’m running into an issue with The Grid. I have 6 tabs, and each one will have a unique horizontal scrolling grid. Right now it seems like only the first tab containing the grid is scroll-able. The grids in the other tabs freeze up and I am not able to scroll through. This is consistent on mobile and tablet displays, as well as desktop.
January 25, 2017 at 9:11 am #1344753
RahulModeratorHey There,
Thanks for writing back!
We’re unable to replicate the issue. Would you mind sending us a Screenshot so that we can take a Closer look of the issue?
Thanks!
January 25, 2017 at 10:30 am #1344913
roman5987ParticipantHi, I made the tab content background grey so its more noticeable. The behavior is inconsistent but here is the scenario that happens most of the time:
Land on the user page, the social tab is active and the grid is displayed. You can see the left and right arrows as well as the bullet points at the bottom. You can use the arrows to scroll, or press down and drag with your mouse. Now, when you switch over to the realistic or investigative tab, you no longer see the bullet points at the bottom and the grid arrows are inactive, so you can not scroll in any way.
January 25, 2017 at 10:31 am #1344916
roman5987ParticipantHere you can see the inactive screenshot
January 25, 2017 at 1:50 pm #1345157
Nabeel AModeratorHi again,
Thank you for the screenshots. You’ve a missing file http://grownup.io/user/roman/jsfunctions.js which could be linked with your functionality. Try fixing it and see if this resolves the issue.
Let us know how this goes!
January 25, 2017 at 3:46 pm #1345321
roman5987ParticipantHi, I moved it to the following page for more isolated testing: http://grownup.io/thegridtest/
There is nothing else on the page however the issue remains.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1333814 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
