Показать сообщение отдельно
  #6 (permalink)  
Старый 13.05.2014, 14:14
Аватар для рони
Профессор
Отправить личное сообщение для рони Посмотреть профиль Найти все сообщения от рони
 
Регистрация: 27.05.2010
Сообщений: 33,124

eFusion,
<!DOCTYPE HTML>

<html>

<head>
  <title>Untitled</title>
  <meta charset="utf-8">
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
  <script>
   $(function ()
{
 $tr = $('tr');
 $('select').change(function (){
 var indx = $tr.index($(this).parents('tr'));
 $('tr').slideUp().slice(indx-1,indx+1).slideDown() ;

 });
 $(':submit').click(function (event){
 event.stopPropagation();
 //event.preventDefault();
 $('tr').slideDown() ;
 })
})
  </script>
</head>

<body>
<form>
<table>
<tr>
<td>$row[0]</td>
<td>$row[1]</td>
<td>$row[2]</td>
<td>$row[3]</td>
<td>$row[4]</td>
</tr>
<tr>
<td><p>Текст</p></td>
<td><select class='span1' id='1' name='conn'>
          <option selected='selected'></option>
          <option>Текст</option>
          <option>Текст</option>
          <option>Текст</option>
        </select></td>
<td><p>Текст</p></td>
        <td><select class='span1' id='2' name='tv'>
           <option selected='selected'></option>
           <option>Текст</option><option>Текст</option>
           <option>Текст</option></select></td>
<td><p>Текст</p></td>
        <td><select class='span1' id='3' name='inet'>
            <option selected='selected'></option>
            <option>Текст</option>
           <option>Текст</option>
            <option>Текст</option>
           </select>
      </td>

<td><button type='submit' id='continue' name='submit'>Готово</button>
</td>
</tr>
<tr>
<td>$row[0]</td>
<td>$row[1]</td>
<td>$row[2]</td>
<td>$row[3]</td>
<td>$row[4]</td>
</tr>
<tr>
<td><p>Текст</p></td>
<td><select class='span1' id='1' name='conn'>
          <option selected='selected'></option>
          <option>Текст</option>
          <option>Текст</option>
          <option>Текст</option>
        </select></td>
<td><p>Текст</p></td>
        <td><select class='span1' id='2' name='tv'>
           <option selected='selected'></option>
           <option>Текст</option><option>Текст</option>
           <option>Текст</option></select></td>
<td><p>Текст</p></td>
        <td><select class='span1' id='3' name='inet'>
            <option selected='selected'></option>
            <option>Текст</option>
           <option>Текст</option>
            <option>Текст</option>
           </select>
      </td>

<td><button type='submit' id='continue' name='submit'>Готово</button>
</td>
</tr>
</table>
</form>

</body>

</html><!DOCTYPE HTML>

<html>

<head>
  <title>Untitled</title>
  <meta charset="utf-8">
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
  <script>
   $(function ()
{
 $tr = $('tr');
 $('select').change(function (){
 var indx = $tr.index($(this).parents('tr'));
 $('tr').slideUp().slice(indx-1,indx+1).slideDown() ;

 });
 $(':submit').click(function (event){
 event.stopPropagation();
 //event.preventDefault();
 $('tr').slideDown() ;
 })
})
  </script>
</head>

<body>
<form>
<table>
<tr>
<td>$row[0]</td>
<td>$row[1]</td>
<td>$row[2]</td>
<td>$row[3]</td>
<td>$row[4]</td>
</tr>
<tr>
<td><p>Текст</p></td>
<td><select class='span1' id='1' name='conn'>
          <option selected='selected'></option>
          <option>Текст</option>
          <option>Текст</option>
          <option>Текст</option>
        </select></td>
<td><p>Текст</p></td>
        <td><select class='span1' id='2' name='tv'>
           <option selected='selected'></option>
           <option>Текст</option><option>Текст</option>
           <option>Текст</option></select></td>
<td><p>Текст</p></td>
        <td><select class='span1' id='3' name='inet'>
            <option selected='selected'></option>
            <option>Текст</option>
           <option>Текст</option>
            <option>Текст</option>
           </select>
      </td>

<td><button type='submit' id='continue' name='submit'>Готово</button>
</td>
</tr>
<tr>
<td>$row[0]</td>
<td>$row[1]</td>
<td>$row[2]</td>
<td>$row[3]</td>
<td>$row[4]</td>
</tr>
<tr>
<td><p>Текст</p></td>
<td><select class='span1' id='1' name='conn'>
          <option selected='selected'></option>
          <option>Текст</option>
          <option>Текст</option>
          <option>Текст</option>
        </select></td>
<td><p>Текст</p></td>
        <td><select class='span1' id='2' name='tv'>
           <option selected='selected'></option>
           <option>Текст</option><option>Текст</option>
           <option>Текст</option></select></td>
<td><p>Текст</p></td>
        <td><select class='span1' id='3' name='inet'>
            <option selected='selected'></option>
            <option>Текст</option>
           <option>Текст</option>
            <option>Текст</option>
           </select>
      </td>

<td><button type='submit' id='continue' name='submit'>Готово</button>
</td>
</tr>
</table>
</form>

</body>

</html>
Ответить с цитированием