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

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