Clarifying question about symbols

In this example video how would one manage identifying the item of clothing based on the ‘add to cart’ symbol that was pressed? My understanding is that symbols are nothing more than linked copies and cannot be named differently nor can they have different ID’s.

With symbols you would need to loop through them all to find the correct one.

How might one loop through and uniquely identify the button? I’m assuming that in that video a button would need to have something unique about it such as an SKU number. An example would be greatly appreciated.

You cannot loop through a unique ID, as the term unique means there is only one. But if you want to loop through symbols you would use this example:

My idea is a little more complicated, but perhaps the question should be, why are you using symbols for unique items when the idea of a symbol is to have identical items, but only have to build them once ?

Here is a working example of using symbols, and manipulating them after they are drawn.

This is using one symbol, but placed 3 times on the same scene, let me know what you think and if it helps? (100.7 KB)

Yes this is great; a big help. I just have one question: is the function $(element).closest(’.product’) reliable? Is there any risk that it would find another price or is the search limited to a single symbol?


it is reliable because it only moves up the stack. Not down :smile: