<span id="product_wished_id">value</span>
I want to get that value and store it in liquid variable.
for example : {% assign myvalue = ? %}
Is there no way to getting an html element value and store it in liquid variable? to perform if else statement in liquid?
2
Answers
No. Liquid code executes on server.
Actually ,Liquid primarily operates on server-side , so it does not have access to your client-side i.e your
DOM
due to which it is not possible to use liquid alone to extract html value and store it in liquid variable.If you need to perform client-side operations like extracting values from HTML elements then use those values in conditional statements ,and than you can use javascript .