Sometimes in my jQuery scripts they don't work unless I nest the events. For example...
$(selector).click(function(){
//do something such as create an element
$(selector).click(function(){
//do something with the created element
});
});
Is this ok? I've always tried to avoid it as it doesn't seem the proper way of doing things. However sometimes it just doesn't work so I have to.