.params_full .range > div — slider selector
$('.params_full input[type=reset]').on('click',function(){ $('.params_full .range > div').each(function(){ var options=$(this).slider('option'); $(this).slider('values',[options.min,options.max]); }); });
Метка
Всего: 96 записей
.params_full .range > div — slider selector
$('.params_full input[type=reset]').on('click',function(){ $('.params_full .range > div').each(function(){ var options=$(this).slider('option'); $(this).slider('values',[options.min,options.max]); }); });
Убрать атрибут readonly="readonly" и добавить class="readonly", и js:
$(".readonly").on('keydown paste',function(e){ e.preventDefault(); });
Например:
$(document).on('mouseover','.q',function(e){ $('#'+$(this).data('tip')).fadeIn(); }); $(document).on('mouseout','.q',function(e){ $('#'+$(this).data('tip')).fadeOut(); });
Вместо:
$('.q').hover(function(){ $('#'+$(this).data('tip')).fadeIn(); },function(){ $('#'+$(this).data('tip')).fadeOut(); });
Модальное окно будет показано при наведении курсора на верхнюю часть документа. Высота в примере 20px. Модальное окно в примере открывается с использованием fancybox.
$(document).ready(function(){ var close_confirm=0; $(document).mousemove(function(e){ if(e.pageY<=20&&!close_confirm){ $("#close_confirm").fancybox().trigger('click'); close_confirm++; } }); });
<a href="/link.html" class="popup fancybox.ajax" id="close_confirm"></a>$(window).scroll(function(){ if($(window).scrollTop()>130){ $('header .top').addClass('fixed'); } else{ $('header .top').removeClass('fixed'); } });
header{ .top{ color:@color_white; background:@color_text; padding:10px 0; &.fixed{ position:fixed; top:0; left:0; width:100%; z-index:10000; } } }
При наведении на ссылку .link показываем блок .block, когда указатель мыши находится вне этого блока и вне ссылки — скрываем.
$(document).ready(function(){ $('.link').hover(function(){ $('.block').addClass('visible'); }); $(window).mousemove(function(event){ if($(event.target).closest(".block").length||$(event.target).closest(".link").length)return; $('.block').removeClass('visible'); }); });
.block{ display:none; } .block.visible{ display:block; }
В случае, когда возникает ошибка Uncaught TypeError: a.indexOf is not a function при использовании последних версий Jquery, например в этом случае:
$(window).load(function(){ });
использовать:
$(window).on('load',function(){ });