I have the html div below:
var htm_div = slider.target;
console.log(html_div); //Returns the html div
<div id="layerslider_2" class="ls-wp-container fitvidsignore ls-v6 ls-container ls-responsive ls-device-is-desktop" style="width: 343px; height: 193px; margin: 0px auto; position: relative; visibility: visible;" data-layerslider-uid="LSzclf85rp7" data-current-slide="4">
<div>....</div>
<div>....</div>
<div>....</div>
</div>
Using javascript or jQuery, I want to get the id value of this div. How to achieve this and thanks.