look at this guys:
<div id="Item_23">
<div class="Info">
<a class="Link" href="#" onclick="call(23)">Link</a>
<div class="text">
<a class="cancel" href="cancel.asp">Cancel</a>
</div>
</div>
</div>
Parent div have dynamic id and its digit part is variable.
Now, i want to select one of this child by class of course in a function. How can do it?
function call(e)
// Selecting a.cancel
end function
Perhaps something likeor
In response to your edit
Try this
You’re missing the underscore in either your call or your jQuery code so it is looking for a div which has the ID
rather than the ID
Here is a JSFiddle which demonstrates getting the cancel link when the other link is clicked.
http://jsfiddle.net/PyDKg/14/
As @undefined suggested, you don’t need the inline javascript call since you’re using jQuery. I have changed the function a bit so it just gets the ID of the parent and sends the entire ID as a parameter.
HTML
JS