Here's a quick and dirty script to show you the mechanism for detecting the '.' within a text box:
PHP Code:
var showIntellisense = function () {
alert('Intellisense Trigger Called');
}
$(function () {
$('input:text').change(function () {
var strContent = $(this).val()
if (strContent.substr(strContent.length - 1) == '.') {
showIntellisense();
}
});
});
But, I'd ask what is this feature for? Can you give a better explanation of how it will be used, as there may be a much better way of implimenting this, such as an API that's specifically built to purpose.
Bookmarks