So I am using, and when I scrolled X pixels, add new objects to the page Will go
(I want to check how I have been added to a new element ( just use it. Length, to check that it exists, after an append () It is ... Or type your own function .... Then use it to return true or false ... Or you can use the livequery () plugin ... I can not find more plugin on the jQuery website, but it was present at one point You can also try domaineinded ... < / P> You can use it on () .... If your selector is always the same ... For example, as you scroll , You say always adding a new div named class = "new device" .... Then you want to do the jackpot .... if you force to click on an event Want to ... class or
id ) or not because because if a new Element is added then I want to do some jQuery on the new element.)
$ ('# elemId'). Length;
if ($ ('# elemId'). Length> 0) {// Your code here} ;
jQuery.fn.Exists = function () {return jQuery (this). Length> 0; };
if ($ ('# elemId'). Exists ()) { // your code here};
$ ('# elemID'). Livequery (function () {// do things binding here are new events and stuff like this // This function is called when an object is added. // Check the function of the delete function and similarly. });
$ (document) .bind ('Dominied', function (e) {console.log (e.target, 'was inserted');});
$ (document) .on ('click', '.newdiv', function () {// your code here});
No comments:
Post a Comment