1024programmer Java javascript-php array traversal problem, js problem, mainly when clicking on the product thumbnail, the click event will be large.

javascript-php array traversal problem, js problem, mainly when clicking on the product thumbnail, the click event will be large.

PHP array traversal problem, js problem, mainly click on the product thumbnail, the click event will be large,

Now click on the first picture The following pictures are the first enlarged pictures of reality
The code is as follows
{foreach from=$goods_list item=goods}

 
             

 

         

Reply content:

PHP array traversal problem, js problem, mainly click on the product thumbnail, the click event will be large,

Now click on the first picture The following pictures are the first enlarged pictures of reality
The code is as follows
{foreach from=$goods_list item=goods}

 
             

 

         

Replace your picBig code

function picBig() {
     var $ = document.querySelector.bind(document);
     var img = event.currentTarget.children[0]; // Get the currently clicked image
     var url = img.getAttribute('src'); // Get the currently clicked image address
     // Get the large image img element and set the image address to be displayed
     $('#pCenter > a > img').setAttribute('src', url);
     //Show preview box
     $('#pCenter').style['display'] = 'block';
 }

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/719560

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索