My Account jQuery Not Working?
-
I’ve add some pagination to the my account page to paginate the order history. Everything works great except when I click the “Edit Account” tab the navigation bar I created for the order table is still visible.
I thought this would be easy enough to fix with some jQuery to match the state change of the table’s display to none when a tab is clicked.
I added the following script to my theme’s main.js file.
$(document).ready(function(){ if ( $( ".shop_table" ).is( ":hidden" ) ) { $('.paging-nav').css('display', 'none'); } });
I’m not very familiar with jQuery, but as far as I know this should work. I have also tried to change the display of .paging-nav with .click functions as well; to change with tab clicks.
Does anyone have an idea of how I can change my div to display none with .shop_table? Is there something in WC that would prevent my script from running, does it need to be added to another file?
- The topic ‘My Account jQuery Not Working?’ is closed to new replies.