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
Dan Webb  
View profile
 More options 21 Apr, 12:43
From: "Dan Webb" <d...@danwebb.net>
Date: Mon, 21 Apr 2008 12:43:12 +0100
Local: Mon 21 Apr 2008 12:43
Subject: Re: Behaviour classes and LiveQuery
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.initialize has 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 Webb
http://www.danwebb.net

aim: danwrong123
skype: danwrong


    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