Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

How to get each child element value using jQuery? 
 
muk_t
Sr. Member
 
Total Posts:  226
Joined:  2012-07-24
 

<dl class="item-options">

    <
dd class="truncated" style="color:red;">DSOX3000-232RS232/UART Serial Decode and Trigger in
        
<a onclick="return false" class="dots" href="#">...</a>/
        <
div class="truncated_full_value">
            <
dl class="item-options">
            <
dt>Software Applications</dt>
            <
dd>information</dd>
            </
dl>
        </
div>
    </
dd>          

    <
div class="mdata">
        <
dd class="truncated">DSOX3000-001WaveGen 20 MHz Function/Arbitrary Wavefor 
        
<a onclick="return false" class="dots" href="#">...</a>/
            <
div class="truncated_full_value">
                <
dl class="item-options">
                <
dt>Advanced Analysis</dt>
                <
dd>DSOX3000-001WaveGen 20 MHz Function/Arbitrary Waveform Generator installed/</dd>
                </
dl>
            </
div>
        </
dd>
    </
div>          

    <
div class="mdata">
        <
dd>DSOX3000-040Memory Upgrade 4 Mpts of MegaZoom IV/</dd>
    </
div>          

    <
div class="mdata">
        <
dd>DSOX3000-806Module GPIB/</dd>
    </
div>          

    <
div class="mdata">
        <
dd class="truncated">DSO0000-903Power cord United States and Canada 120V 
            
<a onclick="return false" class="dots" href="#">...</a>/
            <
div class="truncated_full_value"><dl class="item-options">
                <
dt>Power Cords</dt>
                <
dd>DSO0000-903Power cord United States and Canada 120VNEMA 5-15P male plug/</dd>
                </
dl>
            </
div>
        </
dd>
    </
div>          

    <
div class="mdata">
        <
dd class="truncated">DSOX3000-A6JCertificate of compliance calibration 
        
<a onclick="return false" class="dots" href="#">...</a>/
        <
div class="truncated_full_value">
          <
dl class="item-options">
            <
dt>Calibration Upgrade Commercial Calibration Certificate</dt>
            <
dd id="pppp">DSOX3000-A6JCertificate of compliance calibration ANSI Z540printed/</dd>
           </
dl>
        </
div>
        </
dd>
    </
div>          

    <
p style="margin-top:37px">
        </
p>
            <
dd>R-50C-021-5ANSI Z540-1-1994 Calibration 5 years</dd>
        <
p>
    </
p>          
             
</
dl>

I have following line of code in which content under “

<dl class="item-options">
” is dynamically generated.
What I want is to get the HTML content of all the HTML elements of
<dl class="item-options">
in some variable,
So that I can show that data in the pop up window.

How can I do this? Please Help.

At present I am using code like this.

$(".mdata").each(function(){
      description
+=$(this).html();
});

But this is not getting all the values in proper order.

Please Help.
Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top