Despite trying numerous variations, I am struggling to identify the correct selector of a nested div. The goal is to animate this particular div, but since no animations are taking place, I suspect that I have not selected the right element.
Here is the animation code snippet:
$(".lab1").hover(function(){
$(".panel-group .panel", this).stop(true, false).animate({ marginTop: "-80px;"});
$(".panel", this).stop(true, false).animate({ height: "140px"});
}, function() {
$("div.panel.panel-default", this).stop(true, false).animate({ marginTop: "0px;"});
$(".panel", this).stop(true, false).animate({ height: "98px" });
});
The line responsible for adjusting the marginTop property is not functioning as intended. I have attempted using Chrome's developer tools to find the correct selector without success. Below is the relevant portion of my HTML:
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true" style = "text-align: left;margin-top: 30px;">
<div class="lab1">
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingOne">
<h4 class="panel-title">
<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="false" aria-controls="collapseOne"><i class="fa fa-plus-square-o"></i><span style="margin-left: 12px; display: inline-block;"></span>Lab Focus: Cloud Management with vRealize Operations & <nobr>vRealize Automation</nobr></a>
</h4>
</div>
I am specifically aiming to target the second panel-default element. How can I successfully determine the appropriate selector?