/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* <div id="yourparent"> <div id="mychild"> </div> </div> */ // Here are three ways to access an element within an element: $('#yourparent').find('#mychild') //or even shorter: $('#mychild', $('#yourparent')) //or even shorter: $('#mychild', '#yourparent')