slideup

Animating multiple elements inside another element

痴心易碎 提交于 2019-12-12 04:24:45
问题 So I have container and inside there is yui library with 5 divs. This divs are menus. So what i want to do is that when I move mouse over div only this one will animate UP and when I move mouse somewhere else it will animate DOWN. My js code animate all elements at same time. <div class="container"> <div class='yui3-g-r'> <div class="yui3-u-1-5"> <div class="kvadrat"> <span class="title"><a>Smeri</a></span><br/> <span class="description"> <ul class="blabla"> <li><a class="link" href="smeri

SlideUp slideDown

霸气de小男生 提交于 2019-12-12 00:49:56
问题 i have this javascript code: var x="#wrapper" //var xyz; $(document).ready(function(){ $("#about").click(function(){ if (!(x=="#about")){ $(x).slideUp("slow",function(){ $("#aboutus").slideDown("slow"); }); x="#aboutus"; } }); }); $(document).ready(function(){ $("#home").click(function(){ if(!(x=="#wrapper")){ $(x).slideUp("slow", function(){ $("#wrapper").slideDown("slow"); }); dd="#wrapper"; } }); }); with this "menu" <nav> <div class="menu"> <ul class="ul"> <h6> <li id="home" >Home</li >

jQuery: Selecting only ul, not ul ul

◇◆丶佛笑我妖孽 提交于 2019-12-11 10:12:56
问题 I'm trying to beat a basic accordion style menu into submission – using jQuery. Here's the menu: http://www.cybart.com/bscg/ Here's a snippet of code that gives it accordion functionality: $('#access ul li').click(function(){ $('#access ul ul:visible').slideUp(); $(this).children('ul:hidden').slideDown(); }); The problem: a click on a sub-menu link makes the submenu slide up (and close). I want to keep the submenu open when the submenu link is clicked, and slide up only when a top level links

jQuery .slideUp() not working in Chrome

橙三吉。 提交于 2019-12-11 04:29:45
问题 I'm trying to make an accordion like section to a page I'm working on. I'm not using jQueries native accordion plugin because I need the ability to close all the sections. My problem is Chrome doesn't seem to be responding to .slideUp() while everything seems to work perfectly in Firefox and IE. Rather than try and copy all the relative code snippets I just uploaded here http://ianburris.com/p/tmp/. Any ideas what might be causing this in Chrome? 回答1: You should use a <div> for your

jQuery How to slideUp with delay?

旧街凉风 提交于 2019-12-11 01:54:58
问题 I am using the following jQuery. A div box slides up, and then after 5 seconds, fades out. Is there a way to achieve this as it takes a long time for the box to appear. $(document).ready(function() { $("#load_limit").slideUp(500); //have tried "fast" also $("#load_limit").delay(5000); $("#load_limit").slideDown(500); }); 回答1: You can delay in the callback function: $(document).ready(function() { $("#load_limit").slideUp(500, function() { $("#load_limit").delay(5000).slideDown(500); }); }); or

Are jQuery's hide and slideUp methods equivalent?

左心房为你撑大大i 提交于 2019-12-08 16:12:05
问题 Do slideUp('slow') and hide('slow') result in the same animation effects? Example Code: $(document).ready(function(){ $("#hide").click(function(){ $("p").hide('slow'); }); $("#show").click(function(){ $("p").show('slow'); }); }); <p>If you click on the "Hide" button, I will disappear.</p> <button id="hide">Hide</button> <button id="show">Show</button> 回答1: No. .slideUp('slow') animates the height and vertical padding to zero. .hide('slow') also animates the width, horizontal padding, and

What is the difference between JQuery's hide() and slideDown()/slideUp()?

不羁岁月 提交于 2019-12-07 12:33:38
问题 It seems like after calling both result is the same. 回答1: The show / hide methods animates width, height and opacity, while slideUp / sideDown only animates the height. The default duration of show / hide is zero, so if you don't specify a duartion it will show/hide the element immediately. If you are not seeing any difference between the methods, then they are most likely not working propery with the element that you apply them to. A common reason for that is that you are testing in Internet

JQuery .slideDown() is sliding up

时光毁灭记忆、已成空白 提交于 2019-12-07 06:04:30
问题 This works but I'm not sure why. In function capIn() , in my mind the line $botcap.slideDown("slow") should slide the div down. It slides it up. If I try using .slideUp() nothing happens as if it is trying to slide it down. Can anyone explain this to me? $(".slide").hover(capIn, capOut); function capIn(){ //slide top caption down var $topcap = $(this).children(".topcap"); $topcap.slideDown("slow"); //slide bottom caption up //!! Why does slideDown slide caption up here? var $botcap = $(this)

jQuery slideDown & then slideUp on timer

半城伤御伤魂 提交于 2019-12-06 13:55:38
问题 I have a simple .slideDown function: $globalTabs.find('.seeMore a').live("click", function(){ $globalTabs.find(".allTabs").slideDown('slow'); }); When a user clicks on an <a> in .allTabs , .allTabs does a .slideUp . What I want to do, is if a user has not clicked anything in .allTabs and the mouse is no longer within .allTabs , then a timer initiates to wait x amount of time and then do the .slideUp . Additionally, if the mouse enters .allTabs again before the .slideUp triggers - then the

jQuery - Read More / Read Less. How to replace text?

一个人想着一个人 提交于 2019-12-06 07:36:07
问题 HTML: <a href="#" class="show_hide" data-content="toggle-text">Read More</a> jQuery: // Slide Up Slide Down $('.show_hide').toggle(function(){ $(this).text().replace("Read More", "Read Less"); $('.' + $(this).attr('data-content')).slideDown(); },function(){ $(this).text().replace("Read Less", "Read More"); $('.' + $(this).attr('data-content')).slideUp(); }); I am trying to make one of those "Read More / Read Less" buttons to hide and show text. How do I replace "Read More" with "Read Less" on