370398 (1) [Avatar] Offline
#1
Maybe a silly question. In page 103 4.7.1 Using custom tooltip content.

<input id= 'I show!' title='I don't'>
<script>
$(document).tooltip({
content: function() {
console.log(this);
return this.id;
},
items: '[id]'
})
</script>

The I thought 'this' points to document, but it actually point to <input>. In page 34, you mentioned that ' when using callbacks, this is always set to the widget's DOM element.' So why in this case, 'this' is set to <input> instead of document?