example for get id on ready function

example for get id on ready function

by sanat gupta

HTML

<section class="orderConfirmation-section">
   <strong>23</strong> <!-- i want to select this div-->
</section>

JavaScript

$(document).ready(function() {
    var order_id = $("section.orderConfirmation-section").find("strong").html();
    alert(order_id);
    console.log("order id: ", order_id);
});