0

I have a quick question: is it possible to make a event from when a list elements title is changed?

Example:

<ul>
    <li id="li_1" title="40">40</li>
</ul>

When title attribute changes to (the change come from the server asp.net code):

<ul>
    <li id="li_1" title="60">40</li>
</ul>

a event in jQuery should run.

Example with textbox: when a value is written and the user clicks anywhere, the "blur" event in jQuery runs.

4

2 回答 2

1

您可以为此使用jQuery Watch插件

于 2013-05-23T12:35:25.403 回答
0

您可以使用.on

小提琴 - http://jsfiddle.net/TJFwb/(有点复杂,但仍然是一个 poc)

$("ul li").on("change", function(event) { 
     alert('change');
} );
于 2013-05-23T12:47:12.450 回答