Get the div id of a style = block
<p>I am breaking my head on how to get a specific childs div id which style is block;
I have been googling and stackoverflow browsing the hole day.</p>

<p>I am able to get all children by using:</p>

<pre><code>var active = $('#myDiv').children().get();
</code></pre>

<p>But I don't know how to filter for the style. .attr() is not allowed after .get().
So, I only want to know the id as I need to work with it after.</p>

<p>Edit:</p>

<p>Here is the complete function I want to use:</p>

<pre><code>  // ON MODAL DISMISS, RESET STEPS
  $('#myDiv').on('hidden', function() {

    var currentStep = $('#myDiv').children().filter(function(){
        return $(this).css('display') === 'block'; 
    });

    //console.log(currentStep);
        replace(currentStep, step1);
  });


function replace( hide, show ) {
  document.getElementById(hide).style.display="none";
  document.getElementById(show).style.display="block";
}
</code></pre>

<p>HTML:</p>

<pre><code>&lt;div id="myDiv"&gt;
 &lt;div id="step1"&gt;
  ...
 &lt;/div&gt;
 &lt;div id="step2"&gt;
  ...
 &lt;/div&gt;
 &lt;div id="step3"&gt;
  ...
 &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>Currently when I launch the modal and walk through the steps, but decide to dismiss the modal at step3 and relaunch the modal it will continue on step3. So therefor I thought I would need the current step before dismissal so I can send it to my replace function and set the style of the currentStep to none and the first step to block.</p>
