Показать сообщение отдельно
  #2 (permalink)  
Старый 11.01.2016, 11:04
Профессор
Отправить личное сообщение для laimas Посмотреть профиль Найти все сообщения от laimas
 
Регистрация: 14.01.2015
Сообщений: 12,989

JQ тут не причем:

<html> 
<head> 
<style>
button:first-child {
    visibility: hidden;
}
</style> 
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script> 
$(function() {
    $('button').last().click(function() {
        if($(this).hasClass('my')) $('button').first().css({visibility : 'visible'})    
    })    
});
</script>     
</head> 
<body>
<button>First</button>
<button class="my">Last</button>
</body> 
</html>
Ответить с цитированием