Home Ask Login Register

Developers Planet

Your answer is one click away!

Sandeep February 2016

from 1 d3.select hide another div

I have 2 different divs having different id's #context-menu & #create-context-menu

  .style('display', 'inline-block')
  .on('mouseleave', function() {
       d3.select('#context-menu').style('display', 'none');
       context = null;

I want to hide #context-context-menu div, not onMouseLeave --> From this d3.select I want to hide another div(#create-context-menu).


Gilsha February 2016

  .style('display', 'inline-block')
  .on('mouseover', function() {                   
      //To hide the div with id create-context-menu
      d3.select('#create-context-menu').style('display', 'none');
      //d3.select('#create-context-menu').style('opacity', 0);

Note: To get the div with id context-menu inside the mouseover function, you can use d3.select(this)

Karthikeyan February 2016

Try this to hide the div,


If you want to make the inputs to be disabled use

$('#create-context-menu :input').attr('disabled', true);

Post Status

Asked in February 2016
Viewed 2,161 times
Voted 11
Answered 2 times


Leave an answer

Quote of the day: live life