I wanted to add a onClick function when I click on the link. Basically, whenever I click on "Click" it should add the liquid code in the div. What it is doing is, adding a liquid code yes, but just the code and not the content it should be adding with the liquid code. Here is my code:
Index
<a href="#" id="myLink">Click me!</a>
<div id="result"></div>
<script src="http://code.jquery.com/jquery-latest.min.js"
type="text/javascript"></script>
<script>
$("#myLink").on("click", function(){
$("#result").load("liquidcode.html");
});
</script>
liquidcode.html
{% include 'cod-checker' %}
What I get after clicking on "Click Me" is this {% include 'cod-checker' %}