Reputation: 41
In jade, i'm make test mixins
mixin test(testName)
#test
span Test String
But i want using this in javascript (this is declare in jade file)
script(type='text/javascript').
$( document ).on( "click", "#addBtn", function() {
$("#list").append( I WANT USE MIXIN THIS PLACE );
});
How to use mixin in javascript?
Upvotes: 3
Views: 1402
Reputation: 312
You can't use a Jade mixin in a JavaScript file because Jade templates are rendered on server side.
Upvotes: 2