Errors in jQuery templates or how to use custom type html script tags

Hi,

while using jquery templates in my smarty files I have encountered a problem when more than one template is defined in a row like this:

<script id="pictureAlbumTemplate" type="text/x-jquery-tmpl">
    <span ></span>
</div>

<script id="pictureAlbumItemTemplate" type="text/x-jquery-tmpl">
    <a href="#" onclick="return false" data-id="${ id }"></a>
</script>

Second and subsequent scripts always displays error "Expecting new line or semicolon" in editor.

Screenshot of editor with errors is attached.



Attachment(s):
jquery_template.png
2 comments
Comment actions Permalink

Hi Karolis,

It is a known issue -- please see this ticket: http://youtrack.jetbrains.net/issue/WI-5193?projectKey=WI

0
Comment actions Permalink

Looks like I'll have to get rid of inline javascript. Not a big problem in my case.

0

Please sign in to leave a comment.