I have a content type with 4 fields
- 1.featured_pic
- 2.company_logo
- 3.background_color
I'm using views for the teaser rewriting the result.
<div class="portfolio-background-color" style="background-color:{{ background_color }};" >
<span class="Portfolio-featured-container">
{{ featured_pic }}
<span class="featured-logo-container">
{{ company_logo }}
</span>
</span>
</div>
However the background color is not being picked up. How can I use it as an inline style value.
or is it possible to pass the value {{ background_color }}
to jquery
<script type="text/javascript">
$(document).ready(function() {
$(".portfolio-background-color").hover(
function() {
//mouse over
$(this).css('background', '*{{ background_color }}*')
}, function() {
//mouse out
$(this).css('background', '')
});
});
</script>