livequery
livequery copied to clipboard
$lqguid
With jquery 2.1.x I get this after downloading the latest livequery version: Uncaught TypeError: Cannot read property '$lqguid' of undefined
This error keeps livequery from doing its job. Does livequery work in jquery v2.1.3?
I get the same problem with jquery v1.9.1 .
Online lint tools also show, http://www.jslint.com/ . Bad property name '$lqguid'.
I was using the public signatures incorrectly.
@leblancmeneses could you please elaborate? I still didn't figure out what I am doing wrong... maybe you can help me?
I was using
$('#mylist li').livequery(function(elem) {
});
when the readme.md says
$('#mylist').livequery('li', function(elem) {
});
In the end I choose to just use http://stackoverflow.com/questions/3219758/detect-changes-in-the-dom in my chrome extension.
The same issue I face, seems it is not fixed when a half year pass. It has no problem when I roll back to v1.3.6
Lol noone cares about this problem ^^. I was looking for the fastest solution and ended up taking the only release version v1.1.1 from here https://github.com/brandonaaron/livequery/releases/tag/1.1.1 It's from 2010 so not really a recommendation...
For support for jQuery 3 simply change this line
q = q || new $.livequery(this.selector, this.context, type, fn, fn2);
to this:
q = q || new $.livequery(this, this.prevObject, type, fn, fn2);
Reason is because 'this.selector' is deprecated in jQuery 1.7