Google Groups Home
Help | Sign in
Message from discussion Behaviour classes and LiveQuery
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Alan  
View profile
 More options 21 Apr, 12:56
From: Alan <alan.lar...@gmail.com>
Date: Mon, 21 Apr 2008 04:56:00 -0700 (PDT)
Subject: Re: Behaviour classes and LiveQuery

On 21 Apr, 12:43, "Dan Webb" <d...@danwebb.net> wrote:

> If livequery is included it is used automatically.  You don't need to
> use $().livequery()just the normal $().attach and its all taken care
> of for you.

> On Mon, Apr 21, 2008 at 12:40 PM, Alan <alan.lar...@gmail.com> wrote:

> >  Should I be able to attach behaviour classes using LiveQuery?

> >  Given

> >  Hover = $.klass({
> >   initialize: function(hoverClass) {
> >     this.hoverClass= hoverClass;
> >   },
> >   onmouseover: function() {
> >     this.element.addClass(this.hoverClass);
> >   },
> >   onmouseout: function() {
> >     this.element.removeClass(this.hoverClass);
> >   }
> >  });

> >  this causes the error: this.initializehas no properties Source file:
> >  lowpro.jquery.js Line: 56

> >  jQuery(function($) {
> >   $('#an-element').livequery(Hover);
> >  });

> >  Whereas this would appear to work:

> >  jQuery(function($) {
> >   $('#an-element').livequery("onmouseover", function() {});
> >  });

> >  LiveQuery 1.0.2, jQuery 1.2.3, LowPro for jQuery from Dan's current
> >  github.

> --
> Dan Webbhttp://www.danwebb.net

> aim: danwrong123
> skype: danwrong

Right you are. That was my original understanding but when it didn't
work I figured the livequery call was still required. Of course the
reason it didn't work was that I was misspelled one of my XML class
names ... Sigh.

Ty for prompt response.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google