Javascript won't render when i put it between liquid tags {% javascript %} {% endjavascript %}

For some reason my javascript for my product-detail.liquid file won’t render when in put in between the liquid tags

{% javascript %}

{% endjavascript %}

But the same code renders when i put between the HTML tag in my product-detail.liquid section file. Can some one explain why this is?

Here is the product-detail.liquid file located in the sections directory:


    

        

            

                

                    
                

            

            
                

{{product.title}}

                

{{product.price | money}}

                
                    

{{ product.description }}
                    

                    

                        100ML
                    

                

                {% form  'product', product, id: "add-to-cart"%}
                    
                    
                    

                         
                    

                {% endform %}
            

        
   
    

    

        

Bekijk ook

    

    
    	

		    {% assign this_product = product %}
		    {% for single_product in collections.frontpage.products %}
		    	{% if single_product == this_product %}
		    	{% else %}
			   
		            

		                

		                    

		                    	
		                        	
		                        
		                    

		                    
		                        

		                            {{ single_product.title }}
		                        

		                        

{{ single_product.price | money }}

		                    

		                

		            
  
		    	{% endif %}
		    {% endfor %}
	    

    

1 Like