Tagged: x
-
AuthorPosts
-
September 21, 2016 at 10:28 am #1184805
katyzwiersParticipantHi there, a while ago you showed me how to link to a page with an accordion that would open up a specific box on the accordian. It worked lovely for ages but has recently stopped, could you let me know why? I’ve tried a few things myself but can’t get it to work…
Thanks!
Katy
September 21, 2016 at 11:23 am #1184909
RupokMemberHi Katy,
Thanks for writing in! It should not stop be itself. It seems you have updated Cornerstone but using older version of X. Let’s try to update X to latest version and check again. Make sure the code is there where it supposed to be.
Cheers!
September 26, 2016 at 5:34 am #1190608
katyzwiersParticipantThanks for that Rupok. I updated X, which hasn’t solved the problem. I’ve also double checked the code is still the same in the custom javascript box in CUSTOMISE, which it is:
jQuery ( function ( $ ) {
var hash = window.location.href.split(‘#’)[1];
if ( hash !== undefined && $(‘.page-id-458 a[href^=”#collapse”]’).length > 0 ) {
$(document).ready ( function() {
$( ‘a[href^=”#’ + hash + ‘”]’ ).trigger(‘click’);
} );
}
} );
I’ve also checked the page ID hasn’t changed, and that I’m still using the same link: This
Any other ideas of how to fix this?
Thanks,
Katy
September 26, 2016 at 5:36 am #1190610
katyzwiersParticipant(a href=”http://isthisit.uk/glossary/#collapse-1″) is the link code I’m using, if I put <> and it creates an actual link!
September 26, 2016 at 6:59 am #1190718
Paul RModeratorHi,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
September 26, 2016 at 7:12 am #1190733
katyzwiersParticipantThis reply has been marked as private.September 26, 2016 at 8:14 am #1190780
Paul RModeratorHi Katy,
I changed the js code to this.
jQuery ( function ( $ ) { var hash = window.location.href.split('#')[1]; console.log(hash); if ( hash !== undefined && $('.page-id-458 #'+ hash).length > 0 ) { $(document).ready ( function() { console.log('test'); $( '#'+hash + ' a.x-accordion-toggle' ).trigger('click'); } ); } } );Please add id to each accordion item.
http://screencast.com/t/zrtj8UQ3
I have added an id to the first three to test
http://isthisit.uk/glossary/#test-1
http://isthisit.uk/glossary/#test-2
http://isthisit.uk/glossary/#test-3Feel free to change the id name
Thanks
September 26, 2016 at 8:50 am #1190826
katyzwiersParticipantFab, thank you!!
Katy
September 26, 2016 at 9:53 am #1190917
RahulModeratorYou’re most welcome, Katy!
Let us know if we can help with anything else.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1184805 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
