brandonaaron / livequery

MIT License
477 stars 195 forks source link

$lqguid #26

Open AresD opened 9 years ago

AresD commented 9 years ago

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?

leblancmeneses commented 9 years ago

I get the same problem with jquery v1.9.1 .

Online lint tools also show, http://www.jslint.com/ . Bad property name '$lqguid'.

leblancmeneses commented 9 years ago

I was using the public signatures incorrectly.

AresD commented 9 years ago

@leblancmeneses could you please elaborate? I still didn't figure out what I am doing wrong... maybe you can help me?

leblancmeneses commented 9 years ago

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.

weiminye commented 8 years ago

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

codingyourlife commented 8 years ago

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

ghost commented 6 years ago

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