[jQuery] Live Event with Custom Data?
So I'm not sure if there's a special trick, or if it just can't be
done... but I'm not able to trigger the new "live" events with custom
data. For example, before I had:
$('.class').bind('someCustomEvent', function(e, data){
alert(data)
})
$('.class').trigger('someCustomEvent', ['this will be alerted']);
But with the new .live system (which is, otherwise, been a joy), I
can't get it to fire:
$('.class').live('someCustomEvent', function(e, data){
alert(data) // This actually alerts something to do with a class
name, as far as I can tell?
})
$('.class').trigger('someCustomEvent', ['this will be alerted']);
The live event handler will only alert some nonsense, and not what I
pass in through the trigger()'s data array. Any ideas?