Hello,
#1
what is "hash" & what is "href" and how the fits together:
http://www.thescripts.com/forum/post550671-3.html
#2
the code you've posted is part of global iUI event handler which
checks what UI element triggered event of given type (here "click"),
that simplifies event handling and saves resources (fewer objects,
fewer listeners),
regards,
Peter
On Feb 9, 7:48 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I am modifying iui to put a login button on the toolbar and am not
> sure I quite understand some of the iui code. I hope someone here can
> help me out.
>
> Here is a fragment of iui.js
>
> addEventListener("click", function(event)
> {
> var link = findParent(event.target, "a");
> if (link)
> {
> function unselect() { link.removeAttribute("selected"); }
>
> if (link.href && link.hash && link.hash != "#")
> {
> link.setAttribute("selected", "true");
> iui.showPage($(link.hash.substr(1)));
> setTimeout(unselect, 500);
> }
>
> What I want to understand is what the "hash" attribute of the a tag
> is. I can't find any documentation for it. Is it the part of the uri
> in the <A> that starts with a hash ('#'). Just want to make sure.
> Thanks,
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---