Показать сообщение отдельно
  #1 (permalink)  
Старый 09.08.2016, 21:22
Интересующийся
Отправить личное сообщение для core Посмотреть профиль Найти все сообщения от core
 
Регистрация: 13.11.2012
Сообщений: 19

Картинка+transition и data-content
использую вот такое дополнение для Bootstrap ..
https://silviomoreto.github.io/boots...tomize-options

даю в параметр data-content картинку с ефектом transition а оно не работает... (когда вне- работает)
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<style>
.img-zoom { 
width: 50px;  
-webkit-transition: all .2s ease-in-out;  
-moz-transition: all .2s ease-in-out;  
-o-transition: all .2s ease-in-out;   
-ms-transition: all .2s ease-in-out;
}
.transition {
    -webkit-transform: scale(2); 
    -moz-transform: scale(2);
    -o-transform: scale(2);
    transform: scale(2);
}</style>   


 <script>
$(function(){
    $('.img-zoom').hover(function() {
        $(this).addClass('transition');
 
    }, function() {
        $(this).removeClass('transition');
    });
  });
</script> 

<select class="selectpicker">
  <option data-content="<img class='img-zoom' src='http://www.wispresort.com/images/more_difficult.jpg'>">Relish</option>
  <option data-content="<img class='img-zoom' src='http://www.wispresort.com/images/more_difficult.jpg'>">Relish2</option>
</select>
Ответить с цитированием