任何人都知道如何做到这一点,以便当您单击外部/附属产品的产品存档页面上的图像时,该链接将在弹出窗口中打开,就像您单击图像下方的按钮时一样。目前,当您单击图像时,它会转到产品页面。
我到处搜索,但找不到如何做到这一点。
如果您想了解我的意思,这是我的网站。请帮忙!
http://danielo79.sg-host.com/product-category/uncategorized/ http://danielo79.sg-host.com/product-category/uncategorized/
你能尝试一下这个 jQuery 函数吗:
jQuery( document ).ready( function( $ ) {
$( 'li.product.product-type-external' ).each( function() {
if ( $( this ).find( 'a.button' ).hasClass( 'product_type_external' ) ) {
$( this ).find( 'a:not(.product_type_external)' ).attr( 'href', $( this ).find( 'a.button.product_type_external' ).attr( 'href' ) );
}
} );
} );
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)