I have this event handler, and I can log the DOM element, but I can't do anything with it. Setting the display or anything doesnt have any effect.
Template.layoutTemplate.events({
'mouseover .top_nav_button': function(ev){
ev.preventDefault();
console.log($(this).css('padding'));
$(this).css('display', 'none');
}
});
Here is the template code:
<template name = 'layoutTemplate'>
<div id = 'top_nav'>
{{> loginButtons}}
<a class='top_nav_button' id = 'about_snipex_button' href="{{pathFor 'about'}}">About Snipex</a>
<a class='top_nav_button' id = 'become_verified_button' href="{{pathFor 'verified'}}">Become Verified!</a>
<a class='top_nav_button' id = 'terms_button' href="{{pathFor 'terms'}}">Terms&Conditions</a>
</div>
<h1 id='layout_header'><a id = 'home_button' href="{{pathFor 'home'}}">snippetExchange</a></h1>
<div id='layout_header_row_2'>
<h2 id='layout_by_line'><a id = 'home_button' href="{{pathFor 'home'}}">valuable answers</a></h2>
</div>
<div id='sub_nav'>
<a class='sub_nav_button' id = 'notifications_button' href="{{pathFor 'notifications'}}">notifications</a>
<a class='sub_nav_button' id = 'my_history_button' href="{{pathFor 'user_profile' _id=currentUser}}">my history</a>
<a class='sub_nav_button' id = 'new_post_button' href="{{pathFor 'new_post'}}">new post</a>
</div>
{{> yield}}
</template>