jquery - How to set Meteor helper to true for one of many templates? -


i'm stuck on how set boolean template helper true 1 item , template . how do that?

i'm trying set 1 of many articles true, display additional information article. might have 100 articles in template. , want trigger mouseover boolean on particular template, set helper boolean true upon mouseover trigger display of additional html.

i've got mouseover down:

'mouseover .hover-check': function () {   console.log('hover-check works *one* particular item');   // need set boolean here - tried below code   session.set('showhover', true);    // tried various versions of this... } 

for above tried stuff like:

this.hover

session.set('this.hover');

and

session.set('this.hover', true);

but didn't template correctly. correctly single article though. seems setting variable correctly , getting template trouble is.

i have helper:

template.articleitem.helper({   showhover: function () {   //where need help. i've tried:   return showhover;  //sets hovercheck true each of 100 articles want hovered 1 have hovercheck true   } }); 

there's question of how send showhover === true template. i've tried various ways like:

{{showhover}} seems how docs call it (although don't show how close it). , {{#if showhover}}

using reactivity dealing hover states is, speaking, overkill. such things handled css alone:

<div class="box">   <div class="boxcontent">...</div>   <div class="boxextra">...</div> </div>  .boxextra {   display: none; }  .box:hover .boxextra {   display: block; } 

Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -