src/pyams_thesaurus/zmi/resources/js/pyams_thesaurus.js
changeset 5 86ddb444d0a9
parent 2 de33539c2db2
child 27 ad5f7192d437
equal deleted inserted replaced
4:5dc0c1fa6af6 5:86ddb444d0a9
   111 				MyAMS.ajax.post('get-parent-nodes.json', {term: options.term}, function(data) {
   111 				MyAMS.ajax.post('get-parent-nodes.json', {term: options.term}, function(data) {
   112 					PyAMS_thesaurus.tree.displaySubNodes(data.parent, data.nodes);
   112 					PyAMS_thesaurus.tree.displaySubNodes(data.parent, data.nodes);
   113 					var element = $('span.term:withtext("' + data.term + '")').parents('span.label');
   113 					var element = $('span.term:withtext("' + data.term + '")').parents('span.label');
   114 					$('html,body').animate({scrollTop: element.offset().top - 100}, 1000);
   114 					$('html,body').animate({scrollTop: element.offset().top - 100}, 1000);
   115 					element.css('background-color', 'darkgreen')
   115 					element.css('background-color', 'darkgreen')
       
   116 						   .off('mouseover')
   116 						   .on('mouseover', function() {
   117 						   .on('mouseover', function() {
   117 								$(this).css('background-color', '');
   118 								$(this).css('background-color', '');
   118 						   })
   119 						   })
   119 				});
   120 				});
   120 			},
   121 			},