Jump to content

"More details" button don't work


Fpalarea

Recommended Posts

How you add this button? Did you put correct anchore?

I have put it, delete display: none in Css and I have 2 files product.js and product.tpl that use it.

 

Code product.js

 

//catch the click on the "more infos" button at the top of the page
$(document).on('click', '#short_description_block .button', function(e){
$('#more_info_tab_more_info').click();
$.scrollTo( '#more_info_tabs', 1200 );
});

and product.tpl code

 

{if $product->description_short || $packItems|@count > 0}
<div id="short_description_block">
{if $product->description_short}
<div id="short_description_content" class="rte align_justify" itemprop="description">{$product->description_short}</div>
{/if}


{if $product->description}
<p class="buttons_bottom_block">
<a href="javascript:{ldelim}{rdelim}" class="button">
{l s='More details'}
</a>
</p>
{/if}

 

Link to comment
Share on other sites

Try change js to:

$(document).ready(function (){
            $("#moredetail").click(function (){
                $('html, body').animate({
                    scrollTop: $("#short_description_block").offset().top
                }, 2000);
            });
        });

 and tpl to:

{if $product->description_short || $packItems|@count > 0}
<div id="short_description_block">
{if $product->description_short}
<div id="short_description_content" class="rte align_justify" itemprop="description">{$product->description_short}</div>
{/if}


{if $product->description}
<p class="buttons_bottom_block">
<a href="javascript:{ldelim}{rdelim}" class="button" id="moredetail">
{l s='More details'}
</a>
</p>
{/if}
Link to comment
Share on other sites

 

Try change js to:

$(document).ready(function (){
            $("#moredetail").click(function (){
                $('html, body').animate({
                    scrollTop: $("#short_description_block").offset().top
                }, 2000);
            });
        });

 and tpl to:

{if $product->description_short || $packItems|@count > 0}
<div id="short_description_block">
{if $product->description_short}
<div id="short_description_content" class="rte align_justify" itemprop="description">{$product->description_short}</div>
{/if}


{if $product->description}
<p class="buttons_bottom_block">
<a href="javascript:{ldelim}{rdelim}" class="button" id="moredetail">
{l s='More details'}
</a>
</p>
{/if}

 

Yeah, It's ok when I visit Item's page (http://goo.gl/rm1cXv)

 

BUT doesn't work when I visit simply item view in the frontpage! : http://goo.gl/Sd8D4h

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...