brittainmark:
Hi Anne, Just started working with your excellent template. Think I have found out what is happening with the tabs. It appears that if the tab has no content then the section is not displayed which causes the Java script to fail. I simply removed the if statement and all works fine now. (just after the "<!-- bof:" and just before the "<!--eof:" statements.
Before```php
<!-- bof: specials -->
<?php if ($zc_show_specials == true) { ?>
<section id="section-3">
<div class="centerBoxWrapper" id="specialsDefault">
<?php
/**
* require the columnar_display template to show the products
*/
require($template->get_template_dir('tpl_columnar_display.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_columnar_display.php');
?>
</div>
</section>
<?php } ?>
<!-- eof: specials -->
> After```php
<!-- bof: specials -->
<section id="section-3">
<div class="centerBoxWrapper" id="specialsDefault">
<?php
/**
* require the columnar_display template to show the products
*/
require($template->get_template_dir('tpl_columnar_display.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_columnar_display.php');
?>
</div>
</section>
<!-- eof: specials -->
if you remove these lines from the three template files tpl_modules_specials_default.php, tpl_modules_featured_products.php, tpl_modules_whats_new.php, in "includes\templates\responsive_sheffield_blue\templates" All works fine. (not live yet. Soon hopefully)
While a good catch (seeing that the javascript fails and finding that the code is trying to act on something that is not on screen) the solution is somewhat bass ackwards... The javascript displayed/sent to the browser should be modified to account for the program controlled non-display of those sections rather than forcing those sections of code to display undesirably.
Javascript is something like an addon to html... If the base page display should be as desired without javascript and then javascript actions/code to build off of it. If there is javascript referencing html that was hidden/not displayed, then that javascript shouldn't be there to reference a non-existent portion of the page.
.