Selecting divs using JQuery in Edge Animate
all-
i'm trying return number of items on stage in alert.
inside of compostionready of stage element have following code
$(document).ready(function() {
alert($("#stage").length + " elements!");
});
1 elements returned in alert there 2 divs on stage
i tried grouping objects in 1 div calling them this
$(document).ready(function() {
alert($("#grpdivs").length + " elements!");
});
this yeilds 0 elements
i tried this
$(document).ready(function() {
alert($("#stage grpdivs").length + " elements!");
});
zero same result
i'm working thru jquery tutorial im sure there's subtle difference i'm missing
thanks
hi there,
you're there - in first example, you're saying "tell me how many stage elements have". try this, instead:
$(document).ready(function() {
alert($("#stage").children().length + " elements!");
});
using children() gets child elements of stage.
hth,
joe
More discussions in Edge Animate CC
adobe
Comments
Post a Comment