Anyhow, could use some help in the selectors, here is the basic structure of my code:
Code: Select all
<ol class="sortable" id="sortRoot">
<li id="list_227">
<div class="line-cover" id="debug_228">
<div id="debug_208" class="tools">
<div id="debug_230" class="norm exp">Open/Close</div>
<div id="debug_231" class="norm edit">Edit</div>
<div id="debug_232" class="norm del">Delete</div>
<div id="debug_233" class="norm add">Add</div>
<div id="debug_234" class="editing save">Save</div>
<div id="debug_235" class="editing cancel">Cancel</div>
</div>Code: Select all
var expDiv = $(this).children("div").children("div.tools").children("div.exp") ;Code: Select all
var expDiv = $(this).children("div > div.tools > div.exp") ;Note, this is going through all the <li> items, so can't use the IDs.
I did learn quickly to add debug ID's to everything that doesn't have an ID set (the #'s are from PHP echoing out the line number). that has saved my sanity so much that I can just do a alert($(whatever).attr("id")); to test what it is actually using. They will all be gone on final program.
Thanks.
-Greg