JQuery :: Animate Scrolltop Is Not Working On Its Own Element?
Aug 7, 2010
I want to hide a map until it's needed, then when a button is clicked, load the map then scroll to it.Here's my experimentHere's what I'm using:
<div id="themap" class="themap c2">
<br />
<script type="text/javascript">
[code]....
View 4 Replies
ADVERTISEMENT
Feb 15, 2011
I am migrating a site from prototype/scriptaculous to jQuery, and I am encountering a lot of problems with animations in IE. I should start by asking that in scriptaculous, none of these animations require special CSS or tricks for IE (like getting rid of position absolute or anything like that), but this seems to be the case for almost every animation I do in jQuery - is there a list somewhere of all the little hacks and tricks people need to do to get these animations to work in IE? I have re-implemented a few hundred of these animations (mostly crossfades, sliding up and down, highlights), and not a single one worked in IE with the original CSS from the scriptaculous version (in most cases, the other browsers would). In most cases this has to do with absolute positioning. Is it possible jQuery 1.4.4 (the version I am working with) just has massive problems or something because my impression was this library was supposed to be easier to work with, not inordinately more difficult... I just find it hard to believe everyone else is having this many issues with it.
In any event, one thing I can't find any fix for anywhere, is animating the scrollTop of an element (NOT the whole page, which seems to be what everyone else wants to do). I have a div with overflow:hidden, and two buttons underneath which allow the user to scroll through the div (a real scrollbar in this context would not look good or be very useful in comparison).
I ported the code over from scriptaculous, and it works just fine in all normal browsers. Here is the version that would animate scrolling up:
Tested in Firefox/Chrome/Safari just fine right off the bat. But in IE, it just waits and then calls my callback, setting the scrollTop correctly at the end but not actually animating. It's not totally failing, in the sense that the scrolling does happen, and the callback does fire, but it should animate, and I don't really see any reason why it wouldn't. I have set position on the div and all wrapping divs to relative, and static, and set the display value, set the zoom value, widths, heights, everything, but this div will not animate as it scrolls at all in IE only (this is all IE's - 6, 7, and 8). I also tried isolating the div on its own page, removing nearly all the content (leaving text so it will have something to scroll through), practically no CSS outside of width, height, and overflow, and again - does not work in IE only (works in all other browsers without fail).
View 1 Replies
View Related
Dec 4, 2010
I've been trying to implement a smooth scrolling animation in my page, which works fine in firefox and IE8 (haven't tested any older versions yet). But doesn't seem to work in google chrome (and probably safari either I guess). I have 4 divs on my page, positioned absolutely 2 by 2, only one div should be visible at a time, so the body has gotten an overflow:hidden. When an anchor-link to one of those divs is clicked the javascript gets its position,then scrolls towards it. etting the position works, but the scrolling does not work in chrome.
Now, when I remove 'overflow: hidden' from the body element, the scrolling does work in chrome, but of course adds the scrollbars which I don't want.
[Code]...
View 1 Replies
View Related
Mar 25, 2011
I have this bit of jQuery:
$(document).ready(function() {
$('article').click(function(e) {
e.stopPropagation();
[code]....
It works in Chrome, but not Firefox or IE.[URL]
View 2 Replies
View Related
May 7, 2007
Im using javscript to show a simple pop up where a user clicks on a page.
the code looks something like this:
var ie=document.all;
var nn6=document.getElementById&&!document.all;
function showBx(e){
bx = document.getElementById('tipbox').style;
bx.visibility='visible'
ty = document.body.scrollTop;
bx.left = nn6 ? e.clientX : event.clientX;
bx.top = nn6 ? ty + e.clientY : ty + event.clientY;
return false;
}
I however find out that document.body.scrollTop doesnt work on IE (works on Opera). Any suggestions/recommendations?
View 1 Replies
View Related
Dec 3, 2009
The following script is scrolling my page smoothly, as it is supposed to, in IE and FF however it is not working at all in Safari, any version. The page is:
[URL]
When working correctly, you click the nav buttons in the left sidebar, the page scrolls to the appropriate section.
The script:
$(function(){
$('a[href*=#]').click(function() {
if (location.pathname.replace(/^//,'') == this.pathname.replace(/^//,'')
&& location.hostname == this.hostname) {
[Code]....
View 2 Replies
View Related
May 4, 2010
What is the jquery equivalent of document.body.scrollTop / document.documentElement.scrollTop
View 11 Replies
View Related
Nov 22, 2010
there is a way to add an animation to an element that is being animated?I have an element called #example, i call $(#example).animate({"left",500},10000}, after 5 seconds i want to animate also the top attribute, then i call $(#example).animate({"top",500},10000}. It does not work.I have to stop animate, then create a second animate, or there is some way to merge the two animations?
View 2 Replies
View Related
Jul 26, 2009
If you have a look at [URL].. and click on an image you will see what I mean.It's as if the image is converted to a div while animating.
View 1 Replies
View Related
Jul 31, 2009
Why the remove() doesn't work from this call:
While this one works:
View 3 Replies
View Related
May 4, 2010
I have a big problem, here is the sample of code:
<ul>
<li>
<a href="#"> <img src="#" /> </a>
<div class="info">
[Code]....
So, normaly the div.info element is with css: display:none; And there is displaying only "a" element. But i have a little code of jquery who makes the div.info element showup when the mouse over on the "li" element. And code is working as i expecting, but not in the IE.
var pic = $('ul li');
pic.hover(function(){
$('div.info', this).stop().animate({opacity:'0'}, 600, function(){
[Code]...
View 2 Replies
View Related
Jan 31, 2010
This sure has me puzzled since it's usually the other way around. The script below, straight from a book, works in IE, but not in FF, Chrome, or Safari. Can anyone tell me what I'm not doing that would work in the Good browsers
[Code]...
View 3 Replies
View Related
Aug 5, 2009
[url]
If you click the link in FF you will see that when you press "PLAY" the arrow image animates from the top like it is supposed to... but does not show up in IE.
This could be a jQuery or CSS issue...
JQ:
HTML:
CSS:
View 1 Replies
View Related
Jan 31, 2011
I am having trouble with a script in IE7. The way the animation is meant to work is you click on a colour chip and it enlarges (click again and it reduces). In IE7 it works fine for the first one you click and then you can't click any of the others.
[Code]...
View 3 Replies
View Related
Jan 31, 2011
I want to call stop() on an element animated with animate() based on a user hover. I also want to figure out how close to complete the animation was when the user hovered.
In a simple case I would just compare the animated element property's current value (ie height) to its target value, but in this case I'm creating a generic animator and don't actually know (without a ton of otherwise unnecessary housekeeping) what properties are being animated.
View 1 Replies
View Related
Oct 4, 2009
When I click the background image, f1 gets called and executes as expected, but f2 doesn't get called after the animation in f1.
Drupal.behaviors.director = function(context) {
$("#background").mousemove(function(ev) {
var x = ev.pageX;
var y = ev.pageY;
[Code]....
View 1 Replies
View Related
Apr 14, 2011
I'm using Fancy Form Slider and love it. In firefox, it's working great. In Safari, its not so hot. Check it out:[URL].. It renders fine in both, but the animation is acting REALLY weird in safari.
I've used alerts to see if its using the correct data, and it is. Both the "current" and the new marginLeft are properly being set (in fact, it IS being set in safari, because when i inspect the element, it has the right margin-left data thats being alerted. There's no errors being thrown into the error console, either.
[Code]...
View 1 Replies
View Related
Aug 1, 2010
I have some basic functions to animate something, but they only seem to work in FF, Safari, Opera... but of course not in IE 6.0. I don't know what I'm doing wrong, yet. Tried adding the DTD doctype etc... nothing changes.
Demo right here
<html><head> <title>test</title>
<script
type="text/javascript"
src="js/jquery-1.4.2.min.js"
></script
>
<script
type="text/javascript"
src="js/jquery-ui-1.8.2.min.js"
></script
> .....
View 2 Replies
View Related
May 21, 2009
I try to integrate easing with 1.3.2 animate but seems its just not working. Which version of the easing plugin I should use?
View 2 Replies
View Related
Feb 4, 2010
I'm new on the forum and also using JQuery, came to this Framework thru ZendFramework.... My problème is that i've done an animation that works fine on all browsers (Firefox, Opera, Chrome, Safari) but not on any IE ?
[Code]....
View 1 Replies
View Related
May 26, 2011
After appending an li by append() function , there is some animations through animate function. But in IE9 , it is not working as expected.
below is my code :
$magicLine.stop().animate({
left: $magicLine.data("origLeft"),
width: $magicLine.data("origWidth")
});
View 4 Replies
View Related
Mar 8, 2011
I am using Jquery 1.2.6 version with existing website. I want to animate something on mouse over and for it I used animate function for it but I not able to get expected result.
$(document).ready(function() {
$(".small-packagebuilder").css({"background-position": "5px 0"});
$(".builder_top_magenta span a").hover(function() {
[Code].....
View 2 Replies
View Related
Apr 10, 2010
I want to use animate function(changing the top value of UI tag)for the ui tags with a speed of 6000.Well the top value does change for the UI tag but it the animation is not visible meaning that it moves very fast.Instead it waits for 6000 ms and then at the 6th sec it suddenly changes the top value without giving the animation effect. This problem i m having only for UI tag below is the code
$('#van-one li a').mouseover(
function()
{
$('#van-one li ul').animate({top:"25px"},6000,"linear");
}
);
View 2 Replies
View Related
May 31, 2009
I have an image that I'd like to animate to the top right of its containing div (which has position relative).I've used this:
$(".trigger").click(function(){
$("#image").css({'position' : 'absolute'}).animate({
"top": "10px"
[code]....
View 2 Replies
View Related
Apr 15, 2011
I've created the following rollover effect but it doesn't work as expected :
$(document).ready(function(){
$('#area-row-2-sub-left a').bind({
mouseover: function() {
var tHeight = $(this).height();
[code]....
animate({height: tHeight} correctly sets the initial height but with a duration equal to zero. Seconf problem : a second mouseover on the element won't show the animation at all.
View 1 Replies
View Related
Sep 15, 2010
im having trouble using JQUERYs animate function. Basicly the div has a mouseover event that slides another div (that is inside the original div) upwards. The first div has a mouseout event that slides the second div downwards and out of view. The problem being that when you hover over the second div it fires the first divs mouseout event. Ive tried googling this and have tried adding some event bubbling but having serious trouble with it. here is the website... [URL] hover over the image and you should see the caption appear, roll over the caption and it goes crazy.
[Code]....
View 3 Replies
View Related