hi, i dont know whether it is appropriate to post here, but… i need your help!
i get a string from back-end php via ajax, and write it in a div:
$.ajax ({
...
success: $('.container').html(str);
...
the ‘str’ above like:
<span class='tag'>a</span>
<span class='tag'>b</span>
so, after the success of the ajax, i can get:
<div class='container'>
<span class='tag'>a</span>
<span class='tag'>b</span>
</div>
i also bind a handler to the click event on the span:
$('.container').on({
click: function(){
$(this).addClass('label'); // this works well
//////// here is the problem !!!!
//////// $(this).off(....) -- this is wrong
//////// $('.container').off('click', $(this)) -- also wrong
//////// how to use 'off' to unbind the 'click' event <img src='http://www.yiiframework.com/forum/public/style_emoticons/default/huh.gif' class='bbc_emoticon' alt='???' />?
...
},
...
}, '.tag');
so, as you see above. how can i unbind this ‘click’ event, please?