Reputation: 22030
<td><span id="v">77483.2231</span></td>
When the #v value changes I want to get an pop-up alert
$('#v').change(function() {
alert("ok");
});
That's my code, its not working though, what could be wrong?
Thanks
Jean
Upvotes: 0
Views: 317
Reputation: 327
Sorry, .change() only works with form elements
This event is limited to elements, boxes and elements.
From jQuery Docs
Either do your code where you change the span text elsewhere in the script or set up some kind of listener to watch and see if it changes?
Further explanation of what you're trying to do (and why) would help.
Upvotes: 1