If the model is window.document.one.two.three then could it be a tree were
the roots are 'window', the trunk is 'document' and the branches are all the
divs. Since they can have siblings parents and ancestors I think that
analogy works.

 

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Brandon Aaron
Sent: Sunday, July 22, 2007 9:14 AM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Click to Call a Function Part 2

 

Wait ... trees don't have one branch!? Actually, I tend think of the html as
the whole tree and the head tag as the roots of the tree. The body tag is
the trunk and all the tags within make up the branches of the tree. But up
is still down and down is still up. 

Perhaps I'm just brainwashed into rationalizing the DOM as tree. :)

--
Brandon Aaron

On 7/21/07, Mitchell Waite <[EMAIL PROTECTED] > wrote:

Hey that's great you are enjoying this. And I am IN LOVE with the jQuery
plugins, because of the fact that even if you don't know how they work, they
are super easy to use. Man I have been trying kinds of cool stuff, tooltips,
interface elements, rounded corners, it's like being a candy store. I can
hardly imagine what will happen when I really understand this stuff J 

 

Glen has been fabulous and really thoughtful. Maybe this is karmic kickback
for all those computer books I put my soul into? 

 

Thanks for the post from michael I am sure it's the most lucid writing on
the planet.

 

I think the tree analogy is sinking in but I have always thought it wasn't
the best metaphor. 

 

How many trees have you seen with just one branch? 

 

And whose trunk starts in the sky and grows down?

 

Even the parent/sibling thing leaves me hanging. Maybe I will stumble on
something that works better in my visual cortex, if not it's a tree that is
really lopsided from this one giant branch that everything else branches
from. The GOD branch. To me a raindrop meandering down a wet window is
easier to visualize.

 

I swear to DOM I will get it one day!

 

 

From: jquery-en@googlegroups.com [mailto:
<mailto:jquery-en@googlegroups.com>  [EMAIL PROTECTED] On Behalf
Of Brandon Aaron
Sent: Saturday, July 21, 2007 8:37 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Click to Call a Function Part 2

 

On 7/21/07, Mitchell Waite <[EMAIL PROTECTED]> wrote:

I believe I am getting it. I bet all the luckers are rolling on the floor
with laughter at my naivety.

You won't find anyone laughing at you here. Learning is what this community
is all about! You are asking some very good questions. I know I'm enjoying
the dialog and Glen is doing a excellent job of answering your questions. 

The 'this' keyword can be pretty confusing at first because the object it
represents changes depending on where you are using it. Actually Michael
Geary had a very nice post to the list explaining the 'this' keyword a while
back. Here is the post:
http://groups.google.com/group/jquery-en/msg/92e29565dff28d32
<http://groups.google.com/group/jquery-en/msg/92e29565dff28d32> 

Glen is correct in advising you to think about the html like a tree ... a
DOM tree. jQuery takes a lot of the pain out of navigating around this tree
with its selectors and DOM traversal methods. VisualjQuery.com organizes
these methods very nicely. Go to http://visualjquery.com/ and then click on
'DOM' then 'Traversal'. Then you will see a listing of jQuery methods that
help you navigate through the tree and pick which branches you want to work
with. 

Once you have the elements you want to work with there are lots of methods
that allow you to do things such as set attributes, animate and much more.
Even better jQuery has loads of plugins that deal with more specialized
needs. 

--
Brandon Aaron

 

 

 

Reply via email to