am I misunderstanding what a selector does, here?
Ok, the following bit of code worked for the effect I was going for:
- $("contents").click(function(evt) {
$(contents).animate(
{ fontSize: '+=50%' },
60);
});
However, I was unhappy with the result of that as I can click anywhere in the horizontal space (although maybe there's a workaround?) whereas I just want it to respond to when I click on the actual text. So I tried to base it off of any of the li elements being clicked instead:
- $("contents li").click(function(evt) {
$(contents).animate(
{ fontSize: '+=50%' },
60);
});
Which does not work at all. What is my incorrect assumption on how this all works?
EDIT: Looks like just $("li") works (except it still responds to clicking anywhere in the horizontal space--how can I fix that?). How do I go about obtaining only the li tags that are children of the element with the id 'contents' ?