|
@@ -3,6 +3,23 @@ $(document).ready(function () {
|
|
|
|
|
|
$('#dictionary').load('exercises-content.html div');
|
|
|
|
|
|
+ $('.letter').hover(function () {
|
|
|
+ var $this = $(this);
|
|
|
+ if ($this.attr('title') === undefined) {
|
|
|
+ var idSelector = '#' + this.id;
|
|
|
+ $.ajax({
|
|
|
+ type: 'GET',
|
|
|
+ url: 'exercises-content.html',
|
|
|
+ dataType: 'html',
|
|
|
+ success: function (data) {
|
|
|
+ var $fragment= $('<div />').append($.parseHTML(data)).find(idSelector);
|
|
|
+ var title = $fragment.text().trim();
|
|
|
+ $this.attr('title', title);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
$('#letter-a a').click(function (event) {
|
|
|
event.preventDefault();
|
|
|
|