Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

jquery animate

Posted on 2013-10-25
5
Medium Priority
?
283 Views
Last Modified: 2013-11-08
Hi

i want to animate a div on mouseover


i also want a unordered list to slide down.

Here is the page - hover on "the collective"

http://facilitiescollective.com/the-collective.php

how can i achieve this? it seems to bounce etc

my jquery was:

$("#parent").hover(
  function() {
    $(this).children("ul").slideDown();
    $('#banner').animate({
      top: '+=80'
    }, 500);
  },
  function() {
    $(this).children("ul").slideUp();
    $('#banner').animate({
      top: '-=80'
    }, 500);

});
 

Open in new window


Thanks
0
Comment
Question by:coolispaul
  • 3
  • 2
5 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39601460
That has to rate in the top most annoying broken jquery based menus.

For something like that you could just use slideToggle()
0
 

Author Comment

by:coolispaul
ID: 39601473
but i need to move a div at the same time as revealing the unordered list?
0
 
LVL 58

Expert Comment

by:Gary
ID: 39601513
And is this div under the element you want to slide down? If so it will automatically move down as well (unless you have some rigged CSS)

This would be easier if you actually showed your code and not referred to someone else's website.
0
 

Author Comment

by:coolispaul
ID: 39601535
well its my site - thought easier to show you in context

yes the sub nav is positioned absolutely. Perhaps there is another way of positioning it buts its actually wider than its parent so this was easiest

you can see it functions but a lot of bouncing etc that im unsure how to fix...

Thanks
0
 
LVL 58

Accepted Solution

by:
Gary earned 2000 total points
ID: 39601555
If you can make a test page at http://jsfiddle.net
Or attach your html/css

You have to chain your animations if they are absolutely positioned.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question