Overlapping a div from another using jquery

0

When I click on the + of my select, my system shows and adds an item in the div with "tabs".

Butwhenitshowsthedivthatwashidden,itwouldstayontopofmyselect(asshownintheimage).

  

function:

functionadd(id_sistema){$('#tabs').append("<div id='tabs-2'></div>");

    $("#tabs").tabs("refresh");
    $("#tabs").show();
    $("#divDataJson").show();

}

Briefly this function is when I click on the +.

    
asked by anonymous 11.12.2017 / 15:20

1 answer

1

Take the id of this div and add a z-index in it with the "css" function of jquery below an example

$(document).ready(function(){
  $('#addZindex').on('click',function(){
    $('#exemplo').css("z-index","1");
  });

});
#exemplo{
  height: 200px;
  width: 200px;
  background-color: red;
  position:absolute;
}

#exemplo2{
  height: 200px;
  width: 200px;
  background-color:blue;
  position:absolute;
  left: 30px;
}

#addZindex{
  height: 50px;
  width: 100px;
  z-index: 1;
  float: right;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><divid="exemplo"></div>
<div id="exemplo2"></div>
<button id="addZindex">Mudar Z-index</button>
    
12.12.2017 / 10:49