jQuery: How to Modify Elements Based on item_id Value (Example with 58)
To change it if `item_id` has a value of 58, you can use the following code:\n\njavascript\nif (item_id === \'58\') {\n \$(\'#\' + item_id).closest(\'.qcart_item\').find(\'.qq_item_data\').each(function() {\n // Your code here\n });\n}\n\n\nThis code will only execute the code inside the `.each()` function if `item_id` is equal to the string value `'58'`.
原文地址: https://www.cveoy.top/t/topic/qda8 著作权归作者所有。请勿转载和采集!