I’m loading some content via ajax and need to use the live() function. Since the following plugin has properties to set how do you set it up to use live()?
$(function () {
$("#book-wrapper .books").hoverIntent({
over: enter,
out: leave,
interval: 200
});
});
function enter() { $(this).animate({ width: '+=115px' }, 350, 'swing'); $(".slide-out", this).animate({ opacity: 1 }, 450, 'swing'); }
function leave() { $(this).animate({ width: '-=115px' }, 350, 'swing'); $(".slide-out", this).animate({ opacity: 0.0 }, 450, 'swing'); }
Given your above clarification – you may not actually need
live… asbinddoes this for you. Some other plugins exist that do this as well, includinglivequeryEven simpler would be if your method to add books comes as a result of a jQuery ajax method, you could just re-call your original selector on the
successmethod of$.ajax