unknown "<#" construct in javascript -
i'm newbie in js.. found construct i've never seen , although googled little, haven't fount info:
here piece of code found slider revolution:
<script type="text/html" id="tmpl-attachment-details-two-column"> <div class="attachment-media-view {{ data.orientation }}"> <div class="thumbnail thumbnail-{{ data.type }}"> <# if ( data.uploading ) { #> <div class="media-progress-bar"><div></div></div> <# } else if ( 'image' === data.type && data.sizes && data.sizes.large ) { #> <img class="details-image" src="{{ data.sizes.large.url }}" draggable="false" /> <# } else if ( 'image' === data.type && data.sizes && data.sizes.full ) { #> <img class="details-image" src="{{ data.sizes.full.url }}" draggable="false" /> <# } else if ( -1 === jquery.inarray( data.type, [ 'audio', 'video' ] ) ) { #> <img class="details-image" src="{{ data.icon }}" class="icon" draggable="false" /> <# } #> .... </script>
what used for? what's rules? thanks
this isn't javascript, see type="text/html"
? html template.
see what modern uses of script type="text/html" , example considered use? (among other similar questions).
Comments
Post a Comment