Web Development with jQuery®

(Elliott) #1

Creating Custom Events (^) ❘ 85
addedAdditionalFiles = true;
}
);
}
);
The preceding example’s results are shown in Figure 3-4.


FIGURE 3-4


In Example 3-5, you begin by adding a custom event handler. That custom event handler is repro-


duced here.


.on(
'appendFile.finder',
'div.finderDirectory, div.finderFile',
function(event, file)
{
console.log(file.path);
console.log($(this));
}
);

http://www.it-ebooks.info

Free download pdf