<div id="container_security" class="ui-dialog-content ui-widget-content" style="display: block; width: auto; min-height: 0px; height: 485.40000009536743px;">
<div class="container_sec_class_container" style="display: block;">
<div class="cont_sec_sec" style="height: 70px;">
<p class="container_title">
Name
</p>
<input id="container_name" readonly="readonly" type="text">
<p class="container_secclass_title">Security Class</p>
<dl class="container_security_class dropdown">
<dt>
<span class="parent">
<span class="container_secclass_dropdown">Shipping and Receiving</span>
In the above code I want to set the title attribute to the bottom most element of above DOM tree. I want to set titles of all child spans under span whose class is parent.
i m trying the code written below but it is not working
var dropDownItem = $('#container_security > div > dl > dt > span > span');
dropDownItem.attr('title', dropDownItem.val());