Tagged: x
-
AuthorPosts
-
May 22, 2016 at 8:25 am #1003829
JPLambertsParticipantHi there,
On my home page https://www.ascent.tech under the “Database Consulting Services” section with the five Icons.
If one clicks on any of the five icons the “services” page loads and the relevant accordion section of the right service used to open up.
I did a X Theme and Cornerstone update and now the relevant accordion section won’t open up anymore, only the top accordion section ever opens up, no matter which Icon is clicked.
There were no code changes to the site at all, all I did was update to the latest version of X and Cornerstone and the functionality disappeared.
What gives? 🙂
Please help.
Thanks
Johan
May 22, 2016 at 8:27 am #1003833
JPLambertsParticipantHi there,
I am running:
Wordpress 4.5.2
Cornerstone 1.2.4
X 4.4.2Regards
May 22, 2016 at 8:46 am #1003847
ChristopherModeratorHi there,
Please share the custom JS code you added to achieve this.
Thanks.
May 22, 2016 at 10:33 am #1003925
JPLambertsParticipantHi there Christopher,
I did not realize it was custom code for that, thought it was standard functionality. We lost the developer who worked on this. I went and had a look and this is what I found, is this it?
jQuery(document).ready(function($) { $('.home .x-feature-box-text a:last-child').each( function() { $( this ).parent().parent().parent().find('.x-feature-box-graphic-inner img').wrap( '<a href="' + $( this ).attr('href') + '"></a>' ); $( this ).parent().parent().parent().find('.x-feature-box-title').wrap( '<a href="' + $( this ).attr('href') + '"></a>' ); //x-feature-box-title $( this ).remove(); }); $('.x-accordion-toggle').click(function() { nracc=$(this).closest('.x-accordion-group').index('.x-accordion-group'); accheight = $(this).closest('.x-accordion-group').height(); hght = accheight* nracc; setTimeout(function() { $('html, body').animate({scrollTop: hght}, 700, 'swing'); }, 300); }); }); jQuery ( function( $ ) { }); //manage accordion opens if(window.location.hash) { jQuery(".accordion-body.collapse").removeClass("in"); jQuery(location.hash + " .accordion-body.collapse").addClass("in"); } else { // Fragment doesn't exist } //menu-main-menu jQuery( ".nav_services .sub-menu a" ).on({ click: function() { //nav_item = jQuery( this ).attr( "href" ); nav_item_hash = jQuery(this).attr('href').split('#')[1]; window.location.hash = nav_item_hash; jQuery(".accordion-body.collapse").removeClass("in"); jQuery("#"+nav_item_hash + " .accordion-body.collapse").addClass("in"); //console.log(nav_item_hash); } });Thank you.
Johan
May 22, 2016 at 10:36 am #1003926
JPLambertsParticipantSorry for the lack of indentation, it was indented when I pasted and submitted it.
May 22, 2016 at 11:06 am #1003950
RupokMemberHi Johan,
Thanks for sharing the code. I have checked the code and not sure about this. When we are okay with few teaks and cosmetic changes, we can’t assist on in-depth customization. It would be better if you get back to your developer to assist you on this as we can’t assist on the Custom code. Unfortunately this is out of our support scope.
Thanks for understanding.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1003829 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
