not sure you always catch the click,
you can prevent bubbling to document.body with e.stop()


On Wed, Sep 9, 2009 at 12:14 PM, Fli7e <[email protected]> wrote:

>
> Unchecked but is onClick firing - if attached to body - if you click
> an element like <a> or a button with its own onClick event .. ?
>
> maybe it might be better to attach the onclick event to at least
> elements beeing clickable like buttons and anchors, which also wouls
> save some event calls if someone is just klicking eg. on empty spaces
> or selecting text.
>
> On 9 Sep., 09:37, Oskar Krawczyk <[email protected]> wrote:
> > Isn't that a bit of an overkill? I'm guessing it would be more
> > performant when attaching the hash checker to document.body.onclick–
> > so at least the checker is fired when needed instead of polling
> > endlessly.
> >
> > On 9 Sep 2009, at 07:20, ryan wrote:
> >
> >
> >
> >
> >
> > > I regularly check the hash with a periodical function, every
> > > 100-200ms, which then processes what to do if the hash changes.
> >
> > > On Sep 9, 5:34 am, Jon Hancock <[email protected]> wrote:
> > >> I'm new to mootools.  I/mm looking for techniques for handling
> > >> changes
> > >> to url hash changes.  I'm assuming my urls will look something like
> > >> this:
> >
> > >> myapp.com/book/123
> > >> myapp.com/book/123#page1
> > >> myapp.com/books#search_tags=tag1;tag2;page=3
> >
> > >> I'm flexible in how I handle the structure of the urls, but I do know
> > >> I need to be able to respond to event when the url and/or hash
> > >> changes.
> >
> > >> What do others do?
> >
> > >> thanks, Jon- Zitierten Text ausblenden -
> >
> > - Zitierten Text anzeigen -




-- 
http://tbela99.blogspot.com/

fax : (+33) 08 26 51 94 51

Reply via email to