dmouradov Posted March 3, 2016 Share Posted March 3, 2016 Hi. (Read Reviews) button on product page not working. After clicking on button it added in link (idTab5) but nothing happens If I click on ( Tab REVIEWS ) and thereafter to Read Reviews he raises the page and shows all reviews. Maybe someone knows what the problem is Thanks... My shop deltawings . fr Link to comment Share on other sites More sharing options...
tuk66 Posted March 8, 2016 Share Posted March 8, 2016 It won't work. It is bot about the HREF attribute, but data-toggle="tab" and tab* classes around. 1 Link to comment Share on other sites More sharing options...
dmouradov Posted March 9, 2016 Author Share Posted March 9, 2016 Thanks! Yes you are right !!!!!! It remains to understand how to fix (if it is possible) Link to comment Share on other sites More sharing options...
StefArts Posted January 13, 2017 Share Posted January 13, 2017 Hello, File to edit: /themes/YOUR THEME/js/modules/productcomments/js/productcomments.js I solved the Issue by adding: $('.nav-tabs li').removeClass('active'); $('.tab-content div').removeClass('active'); $('.nav-tabs li:last-child').addClass('active'); $('.tab-content div:last-child').addClass('active'); just after: $(document).on('click', 'a[href=#idTab5]', function(e){ $('*[id^=idTab]').addClass('block_hidden_only_for_screen'); $('div#idTab5').removeClass('block_hidden_only_for_screen'); $('ul#more_info_tabs a[href^=#idTab]').removeClass('selected'); $('a[href=#idTab5]').addClass('selected'); My complete code is: $(document).on('click', 'a[href=#idTab5]', function(e){ $('*[id^=idTab]').addClass('block_hidden_only_for_screen'); $('div#idTab5').removeClass('block_hidden_only_for_screen'); $('ul#more_info_tabs a[href^=#idTab]').removeClass('selected'); $('a[href=#idTab5]').addClass('selected'); $('.nav-tabs li').removeClass('active'); $('.tab-content div').removeClass('active'); $('.nav-tabs li:last-child').addClass('active'); $('.tab-content div:last-child').addClass('active'); }); For a smooth scroling effect to the div I have added: $.scrollTo('#THE DIV YOU WANT', 400, {'offset': -50 }); return false; Complete final code: $(document).on('click', 'a[href=#idTab5]', function(e){ $('*[id^=idTab]').addClass('block_hidden_only_for_screen'); $('div#idTab5').removeClass('block_hidden_only_for_screen'); $('ul#more_info_tabs a[href^=#idTab]').removeClass('selected'); $('a[href=#idTab5]').addClass('selected'); $('.nav-tabs li').removeClass('active'); $('.tab-content div').removeClass('active'); $('.nav-tabs li:last-child').addClass('active'); $('.tab-content div:last-child').addClass('active'); $.scrollTo('#THE DIV YOU WANT', 400, {'offset': -50 }); return false; }); In my case it was on line nº42 * I put "#THE DIV YOU WANT" because I'm not using defaults tab and I don't know the name of the default tabs. You have to change it with the correct div id It has worked well on my prestashop version which is 1.6.1.6 Hope it can help Regards. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now