Tag: hover

jQuery模糊hover效果问题

我再次遇到jQuery的问题,希望有人可以帮助我。 请在http://matoweb.com查看投资组合部分(应该有两个项目) 我正在重新设计我的投资组合网站,我想列出具有模糊hover效果的最后6个投资组合项目。 我设法使用一个图像(第二个实际上是第一个post),但现在我添加了另一个测试组合项并有两个问题: 我只得到第一个post(第二个图像)的模糊图像,第二个post的图像没有得到它自己的模糊版本图像 第二个问题是,当我将鼠标hover在一个图像上时,它也会触发第二个图像的动画 这是这些效果的代码,但您可以在网站上查看它: $(window).load(function(){ $(“.img_portfolio”).pixastic(“blurfast”, {amount:1}); }); $(function() { $(“.prva_stran_portfolio_single”).mouseenter(function () { $(“.normal_image”).fadeOut(“fast”); }).mouseleave (function () { $(“.normal_image”).fadeIn(“fast”); }); }); $(function() { $(“.roll”).css(“opacity”,”0″); $(“.roll”).hover(function () { $(this).stop().animate({ opacity: 0.9 }, “fast”); }, function () { $(this).stop().animate({ opacity: 0 }, “fast”); }); }); 任何帮助将是真正的appretiatied家伙。 我怎么能在图像上添加某种ID,这样当它们只hover在其中一个上时它们并不都会模糊?

jQueryhover(show-hide)

我使用show / hide在jQuery中使用弹出菜单。 我想为我的例子做一个绿色矩形clikable。 示例: http : //jsfiddle.net/Q5cRU/27/ $(document).ready(function(){ $(‘.rectangle1’).hide(); $(‘#rectangle’).hover(function() { $(‘.rectangle1’).show() },function() { $(‘.rectangle1’).hide() }); });

jqGrid – 单击行可删除altclass和hoverrows

我们使用带有altclass和hoverrows:true 。 单击某行时,不再应用altclass类,并且hover效果不再适用于单击的行。 你怎么能阻止这种情况发生?

将jQuery函数从hover更改为slideToggle

在SOers的帮助下,我能够更有效地使用hover和淡入/淡出function来显示此图像布局下的文本div。 但是我想使用slideToggle,因为hover时,文本闪烁,div反弹。 我如何调整此函数以使用slideToggle,其中切换需要单击每个图像? jsfiddle: http : //jsfiddle.net/Ckrtu/11/ 这是我想要做的图像: 这是旧的hoverfunction $(document).ready(function() { $(“#imagegallerydiv”).delegate(“dt[class]”, “hover”, function(e) { if (e.type === “mouseenter”) { var index = $(this).parent().index(); $(“#wide-text-div-under-all-images div”).eq(index).fadeIn(‘fast’); } if (e.type === “mouseleave”) { var index = $(this).parent().index(); $(“#wide-text-div-under-all-images div”).eq(index).fadeOut(‘fast’); } }); }); CSS: #imagegallerydiv {width: 700px; height:200px; margin:5px; text-align: center;} dl.gallery {width: 97px; text-align: center; float: […]

处理触摸设备和hover效果

我尝试删除或阻止触摸设备上的所有hover效果。 我尝试使用几个脚本,但它对我不起作用。 如何使用开发工具对其进行测试? 我尝试这样的脚本,但有一些错误。 无法读取null的属性’addEventListener’。 但它在这里工作codepen有错误导致dom树还没有加载吗? $(window).on(‘load’, function() { if (!(‘addEventListener’ in window)) { return; } var htmlElement = document.querySelector(‘html’); function touchStart() { htmlElement.classList.remove(‘hover-active’); htmlElement.removeEventListener(‘touchstart’, touchStart); } htmlElement.addEventListener(‘touchstart’, touchStart); }); 我也试试这个 if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){} 我也尝试使用modernizr,它只适用于html.touch和html.no-touch中的每个选择器 function is_touch_device() { return ‘ontouchstart’ in window // works on most browsers || navigator.maxTouchPoints; // works on IE10/11 and Surface […]

jQuery在hover时调整div框

我有两部分代码,做3件事: 仅调整6个.boxes div中的一个(使用它的文本内容) 制作未选中的透明.box div 显示隐藏。更多跨度 码: $(‘.content_area div’).hide(); $(function(){ $(‘.box’).bind(‘mouseover’,function() { $(this).addClass(‘up’); $(‘.box’).not(‘.up’).fadeTo(‘normal’,0.2); }); $(‘.box’).bind(‘mouseout’,function() { $(‘.box’).removeClass(‘up’).fadeTo(‘normal’,1); }); }); initwidth = $(‘.box’).width(); initHeight = $(‘.box’).height(); $(‘.box’).hover(function(){ $(this).children(‘.more’).show(); $(this).stop().animate({width: ‘220’, height: ‘140’},{queue:false, duration:’fast’}).css(‘font-size’, ‘1.2em’); }, function(){ $(this).children(‘.more’).hide(); $(this).stop().animate({width: initwidth, height: initHeight},{queue:false, duration:’fast’}).css(‘font-size’, ‘1em’); }); 但有些事情是错误的。 只有第一个盒子工作得很好,但是在resize时它不会掩盖其他盒子。 它的影响你可以在这里看到: jsFiddle 我的问题是:是否有可能统一这些代码并使其有效? : – [

使用jquery,如何在hover链接时更改图像?

我有一个链接列表(文本菜单),我需要在每个链接hover时更改其他区域中的图像… 图像需要在同一个地方显示,让我们说在右边100×100区域…任何想法实现这一点? 每个链接都可以有图像的src吗? 不知道怎么做:(

将鼠标hover在另一个div上时更改Div属性?

所以基本上这就是我将要拥有的: Text Text Text etc. 我将如何进行以下操作:如果有人将鼠标hover在div“1”(整个容器div)上,则更改“bottom”div(并且只有底部div)的属性,例如添加一个名为“over”的类。 我确定有一种方法,但我猜它需要使用像jquery这样的东西。

jQuery SubMenu的机会

我整晚都在工作,但没有用。 典型的SubMenu问题和香港专业教育学院在这里阅读了很多类似的问题,但无法找到解决办法。 我有一个菜单,这是一个无序的列表。 我也有一个相同的子菜单。 我的菜单位置很好等问题是,当我的子菜单出现在常规菜单的一侧时,就像我从菜单1hover到菜单2一样,它就消失了。 我确定它的东西很简单,但可以看看吗? $(document).ready(function() { $(‘.nav’).hover(function(e) { if(!$(‘.nav2’).is(‘:visible’)) { $(‘.nav2’).fadeIn(‘slow’); } },function(){ if(!$(‘.nav2’).is(‘:hover’)) { $(‘.nav2’).fadeOut(‘slow’); } }); $(‘.nav2’).mouseout(function(){ if(!$(‘.nav’).is(‘:hover’)) { $(‘.nav2’).fadeOut(‘slow’); } }); }); 我的名单是: Home About New Listings Featured Home Town Facts Contact Me Bio Credentials Education

hover用Jqueryhover事件指示选择

我有这个代码突出显示任何元素,如果徘徊在: $(‘*’).hover(function() { $(this).addClass(‘over’); }, function() { $(this).removeClass(‘over’); }); 问题是我的选择周围的所有元素也会突出显示。 看看示例: JsFiddle尝试将鼠标hover在span ,您将看到p和body/html也被突出显示。 我需要改变什么才能仅抬高我hover的部分? ps我必须使用*因为我不知道属性是什么。