How would I change the html of a tag like so:
$('#someId').html('<p>foo bar</p>');
while using the live() or delegate() function? Just for clarification I don’t want this to happen on hover or focus or click… I just want jquery to immediately change the html inside of a certain tag.
Basically, I’m trying to change the logo in the Mojomotor’s little dropdown panel and I don’t want to change the logo every time I upgrade to a new version.
Any suggestions?
.live()and.delegate()don’t work like this, what you’re after is still done through the.livequery()plugin or simply in thedocument.readyif it’s present on page load, like this:Or with
.livequery()if it’s replaced dynamically in the page:.live()and.delegate()work off of event bubbling…an element just appearing doesn’t do this whereas aclickorchange, etc would.