I have the following task: there are a simple table from mysql database:
<html>
<body>
<table border='1'>
<?php
mysql_connect('url','user','') or die('Connect');
mysql_select_db('jquery_test') or die('Db');
$query=mysql_query('SELECT * FROM labels');
while($data=mysql_fetch_assoc($query))
{
echo '<tr>';
echo '<td>'.$data['id'].'</td>';
echo '<td>'.$data['label'].'</td>';
echo '<td>'.$data['english'].'</td>';
echo '</tr>';
}
?>
</table>
</body>
</html>
This code show a simple talbe. I need to make the following feature: when the user moves the cursor to $data[‘english’] field then it must appear the text field for editing and “Save” button; when the cursor leaves this word then the field must dissapear. There is a fantastic example what I mean: http://translate.uservoice.com/sets/51-end-user-ru/translations?filter=missing. Please, help me, I know only HTML/PHP and don’t know how can I do this task. It will be very good to use JQuery for it.
Check out this jquery plugin to make editable labels and use it on
.mouseover()and.mouseleave()functions.