Created
November 1, 2016 16:18
-
-
Save rali14/808563acef395732986f61a2830b4ff5 to your computer and use it in GitHub Desktop.
Jobify Map Bubble Template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script id="tmpl-infoBubble" type="text/template"> | |
<a href="{{{ data.link }}}"> | |
<# if ( typeof( data.thumb ) != 'undefined') { #> | |
<span style="background-image: url({{{ data.thumb }}})" class="list-cover has-image"></span> | |
<# } #> | |
<# if ( typeof( data.title ) != 'undefined') { #> | |
<h1>{{{ data.title }}}</h1> | |
<# } #> | |
<# if ( typeof( data.rating ) != 'undefined') { #> | |
<span class="rating stars-{{{ data.rating }}}"> | |
{{{ data.rating }}} | |
</span> | |
<# } #> | |
<# if ( typeof( data.address ) != 'undefined') { #> | |
<span class="address">{{{ data.address }}}</span> | |
<# } #> | |
<# if ( typeof( data.date_added ) != 'undefined') { #> | |
<span class="date">{{{ data.date_added }}}</span> | |
<# } #> | |
</a> | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi rali14
Thanks a lot for those examples.
Would you know how to figure out what code to use if I want to show following in the pop-up:
I have tried changing the word "address" with the word "category" and "listing_category" in your code above, but al it does is to remove the address from the pop-up.
I can't figure out what to type in the "typeof", the "span class" and the data.xxx
Thanks a bunch!