Tagged: x
-
AuthorPosts
-
October 17, 2016 at 2:46 pm #1219794
Austin AbellParticipantHi!
I am getting an error on all of my pages that seems to pertain to x-customizer-js.
“Uncaught TypeError: Cannot read property ‘top’ of undefined”
Whenever I try and go into customizer it just constantly refreshes. Any help on this?
Thanks,
AustinURL to check: https://centerclub.401kbuddy.com/getting-started/
October 17, 2016 at 2:47 pm #1219795
Austin AbellParticipantThis reply has been marked as private.October 17, 2016 at 4:41 pm #1219921
NicoModeratorHi There,
Thanks for writing in.
You could try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.
Let us know how it goes.
Thanks.
October 18, 2016 at 8:05 am #1220772
Austin AbellParticipantJust deactivating everything and they same error came up 🙁 the error is coming from this line of code var yloc = $(‘.x-tab-content [data-cs-tab-index=”‘ + tabnav + ‘”]’).offset().top;.
what does the code below do? maybe I can figure it out if I knew what the code did. thanks
<script id=”x-customizer-js”>
(function($){
var tabnav = location.href.split(“#tab-“).slice(-1)[0];if ( tabnav || tabnav != ” ) {
$( document ).ready ( function() {
console.log(tabnav);
var navbar = $(‘.x-navbar’).outerHeight();
$(‘.x-nav-tabs .x-nav-tabs-item [data-cs-tab-toggle=”‘ + tabnav + ‘”]’).trigger(‘click’);
setTimeout ( function() { //Let’s trigger the scroll animation just after the content is displayed.
var yloc = $(‘.x-tab-content [data-cs-tab-index=”‘ + tabnav + ‘”]’).offset().top;
console.log($(‘.x-tab-content [data-cs-tab-index=”‘ + tabnav + ‘”]’).offset().top);
console.log(‘tab: ‘ + tabnav + ‘, yloc: ‘ + yloc);$(‘html, body’).animate({
scrollTop: yloc
}, 850, ‘easeInOutExpo’);}, 750 );
} );
}
October 18, 2016 at 10:23 am #1220955
RupokMemberHi there,
Are you using Tabs element or shortcode in any page?
Let us know. You can ignore the error for now if you have other pending development because it won’t affect anything else.
Thanks!
October 18, 2016 at 10:33 am #1220971
Austin AbellParticipantI do use shortcodes on some pages but don’t think I use tabs element. The reason I was concerned was when I go into cusomizer it just continually refreshes and makes it hard to make changes. Good to know it wont affect anything else!
October 18, 2016 at 11:51 am #1221048
JoaoModeratorHi There,
Let us know if you need further help,
Joao
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1219794 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
