javascript - from 1 d3.select hide another div -
i have 2 different divs having different id's #context-menu
& #create-context-menu
d3.select('#context-menu') .style('display', 'inline-block') .on('mouseleave', function() { d3.select('#context-menu').style('display', 'none'); context = null; });
i want hide #context-context-menu
div, not onmouseleave
--> d3.select
want hide div(#create-context-menu
).
d3.select('#context-menu') .style('display', 'inline-block') .on('mouseover', function() { //to hide div id create-context-menu d3.select('#create-context-menu').style('display', 'none'); //or //d3.select('#create-context-menu').style('opacity', 0); });
note: div id context-menu
inside mouseover function, can use d3.select(this)
Comments
Post a Comment