Google Groups Home
Help | Sign in
Behaviour classes and LiveQuery
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all
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:40
From: Alan <alan.lar...@gmail.com>
Date: Mon, 21 Apr 2008 04:40:56 -0700 (PDT)
Local: Mon 21 Apr 2008 12:40
Subject: Behaviour classes and LiveQuery
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.

    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.
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.

--
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.
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:

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.
End of messages
« Back to Discussions « Newer topic     Older topic »

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