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

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -